assignDeep copy plain objects values instead of reference#151
Open
cherifGsoul wants to merge 9 commits intomasterfrom
Open
assignDeep copy plain objects values instead of reference#151cherifGsoul wants to merge 9 commits intomasterfrom
cherifGsoul wants to merge 9 commits intomasterfrom
Conversation
Contributor
justinbmeyer
left a comment
There was a problem hiding this comment.
Have you tested this against canjs/canjs? If everything passes, this looks good to me. This feels like something downstream might break.
Member
Author
|
@justinbmeyer I edited the code and tested it with |
reflections/shape/shape.js
Outdated
| getSetReflections.setKeyValue(target, key, newVal); | ||
| // Plain objects needs to be serialized to make sure | ||
| // newVal is copied not referenced #150 | ||
| if (typeReflections.isMapLike(newVal) && !typeReflections.isObservableLike(newVal)) { |
Contributor
There was a problem hiding this comment.
This won't solve the original issue since it was using a DefineMap. Is that being handled somewhere else?
Contributor
|
@cherifGsoul, can you add tests for each of the scenarios that is failing in other repos? The tests I can think of:
I think you were also running into an issue with |
This comment has been minimized.
This comment has been minimized.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For #150