-
Notifications
You must be signed in to change notification settings - Fork 4
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
assignDeep copy plain objects values instead of reference #151
base: master
Are you sure you want to change the base?
Conversation
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.
Have you tested this against canjs/canjs
? If everything passes, this looks good to me. This feels like something downstream might break.
@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)) { |
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.
This won't solve the original issue since it was using a DefineMap. Is that being handled somewhere else?
@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 |
For #150