Skip to content
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

children should not have changes when data is set during parent instantiation #120

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nemophrost
Copy link

By have changes I mean calling .hasChanged() should not return true.

@nemophrost
Copy link
Author

Not sure this is best place for solving the problem.

Another idea is at line 146, setting this[attr]._changed = {} for children (like what is done at the end of the Base constructor). This seems worse to me though because then it would be changing "private" attributes on something other than itself.

Yet another option could be to pass along the initial data for the child to _initChildren and exclude that from the data being set during instantiation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants