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

Assertion Failed: You attempted to access the size property #16259

Closed
Turbo87 opened this issue Feb 19, 2018 · 2 comments
Closed

Assertion Failed: You attempted to access the size property #16259

Turbo87 opened this issue Feb 19, 2018 · 2 comments

Comments

@Turbo87
Copy link
Member

Turbo87 commented Feb 19, 2018

on Ember 3.1.0-beta.1:

Assertion Failed: You attempted to access the size property (of DS.Errors:ember1800).
Since Ember 3.1, this is usually fine as you no longer need to use .get()
to access computed properties. However, in this case, the object in question
is a special kind of Ember object (a proxy). Therefore, it is still necessary
to use .get('size') in this case.

If you encountered this error because of third-party code that you don't control,
there is more information at #16148, and
you can help us improve this error message by telling us more about what happened in
this situation.

This seems to be caused by Ember Data using isEmpty() on a DS.Errors object. Since isEmpty() checks obj.size unconditionally it is causing the error above.

@Turbo87
Copy link
Member Author

Turbo87 commented Feb 19, 2018

Seems to be related to #9414

/cc @mixonic

@rwjblue
Copy link
Member

rwjblue commented Feb 19, 2018

This was fixed in emberjs/data#5340. The issue is that the DS.Errors unknownProperty returned null instead of undefined (and our proxy assertion only “allows” undefined).

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

3 participants