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

Model.reset() does not reset the id #1982

Open
dpobel opened this issue Nov 28, 2014 · 0 comments
Open

Model.reset() does not reset the id #1982

dpobel opened this issue Nov 28, 2014 · 0 comments

Comments

@dpobel
Copy link

dpobel commented Nov 28, 2014

It seems like the reset() method on a model instance does not reset the id attribute correctly.
Example:

var model = new Y.Model();
model.set('id', 'an id');
model.reset();
// model.get('id') still returns 'an id'

For an unknown reason (to me), at some point the internal state of model object gets the id value as its initValue and this breaks the reset process.

dpobel added a commit to ezsystems/PlatformUIBundle that referenced this issue Nov 28, 2014
…s in a row

This is caused by yui/yui3#1982 and the fix introduces
a workaround for that.
dpobel added a commit to ezsystems/PlatformUIBundle that referenced this issue Nov 28, 2014
…s in a row

This is caused by yui/yui3#1982 and the fix introduces
a workaround for that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant