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 beta] Ensure accessing a "proxy" itself does not error. #16274

Merged
merged 1 commit into from
Feb 23, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Feb 23, 2018

Prior to this change, if Ember.get (or this.get) is used to access a property that is an Ember.Object with an unknownProperty that always returns a non-undefined value, the internals of Ember.get would check if that property is a "descriptor" and (due to the unknownProperty never returning undefined) the dev time assertion for accessing a proxy's content without using Ember.get would be triggered.

Fixes #16263

Prior to this change, if `Ember.get` (or `this.get`) is used to access a
property that is an Ember.Object with an `unknownProperty` that always
returns a non-`undefined` value, the internals of `Ember.get` would
check if that property is a "descriptor" and (due to the
`unknownProperty` never returning `undefined`) the dev time assertion
for accessing a proxy's content without using `Ember.get` would be
triggered.
@rwjblue
Copy link
Member Author

rwjblue commented Feb 23, 2018

/cc @wagenet

@wagenet
Copy link
Member

wagenet commented Feb 23, 2018

For completeness, we may want to mention that this should also resolve a similar situation where the proxy's content was destroyed and certain types of access to destroyed objects would raise assertions.

Copy link
Member

@wagenet wagenet left a comment

Choose a reason for hiding this comment

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

This appears to resolve my issue.

@rwjblue rwjblue merged commit c9b68d1 into emberjs:master Feb 23, 2018
@rwjblue rwjblue deleted the __descriptor__-opt-out branch February 23, 2018 17:55
@sly7-7
Copy link
Contributor

sly7-7 commented Feb 24, 2018

❤️ :party:

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

Successfully merging this pull request may close these issues.

3 participants