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

Calling isEmpty on instances of ObjectProxy wrapping ArrayProxy throws Assertion Failed: You attempted to access the length property #16878

Closed
janvotava opened this issue Aug 13, 2018 · 0 comments · Fixed by #16879

Comments

@janvotava
Copy link
Contributor

While working on one of our projects, I encountered an error which I managed to boil down to the following:

Ember.isEmpty(Ember.ObjectProxy.create({
  content: Ember.ArrayProxy.create({
    content: Ember.A([])
  })
}))

Looks like a regression caused by utilisation of ES5 getters, it worked in Ember 3.0.0.

It breaks for example ember-changeset with ember-data-model-fragments.

janvotava added a commit to janvotava/ember.js that referenced this issue Aug 13, 2018
So ArrayProxy inside ObjectProxy works with ES5 getters
Fixes emberjs#16878
locks pushed a commit that referenced this issue Feb 11, 2022
So ArrayProxy inside ObjectProxy works with ES5 getters
Fixes #16878
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants