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

[BUGFIX] isEmpty on nested objects #16879

Merged
merged 1 commit into from Feb 11, 2022

Conversation

janvotava
Copy link
Contributor

@janvotava janvotava commented Aug 13, 2018

So ArrayProxy inside ObjectProxy works with ES5 getters and there's no Assertion Failed: You attempted to access the 'length' property error.

Fixes #16878

@Turbo87 Turbo87 requested a review from a team December 19, 2018 17:32
let length = get(obj, 'length');
if (typeof length === 'number') {
return !length;
}
}

if (typeof obj.length === 'number' && objectType !== 'function') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, do we even need this check anymore?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what allows an empty string ('') to be marked as empty.

@sheebz45

This comment has been minimized.

@pzuraq pzuraq requested a review from tomdale March 29, 2019 18:30
@locks locks self-assigned this Apr 18, 2020
@locks
Copy link
Contributor

locks commented Feb 10, 2022

@janvotava do you have some time to pick this back up? 😅

So ArrayProxy inside ObjectProxy works with ES5 getters
Fixes emberjs#16878
@wagenet
Copy link
Member

wagenet commented Feb 10, 2022

@janvotava @locks I rebased this for you.

@janvotava
Copy link
Contributor Author

@locks I'm sorry. What exactly do you mean by that? 😅

@locks
Copy link
Contributor

locks commented Feb 11, 2022

All is good, @wagenet took care of it :)

@locks locks merged commit 4dbff0b into emberjs:master Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
5 participants