-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed falsey/null value issues in jsong merge #124
Merged
ThePrimeagen
merged 1 commit into
Netflix:master
from
sdesai:fixEmptyAtomForFalseyValuesInJSONG
Aug 25, 2015
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaelbpaulson, @jhusain
The
message.type
here seems to be a bug also, but 'fixing' it (I assume it's supposed to bemessage.$type
as opposed tomessage.type
) breaks theJSONG - Merge should write a simple path to the cache
basic unit test in jsongMerge.spec.js. Needed some input on what the expected output should be for this test to determine if the test is broken, or there are potentially more bugs in the jsongMerge impl, which need to be teased out.This is the failing test, if I change this line to be
message.$type
:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sdesai you are correct. I think the good news is that we remove that statement and only ever use the value that is handed to us. This could potentially strip some valuable meta data on a node by using the
.value
of the handed back value.So what I am saying is that you were correct in assuming that this is incorrect, because it is. But the fix is to remove
message.type ? message.value : message
withmessage