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] Ensure @sort works on non-Ember.Objects. #17841

Merged
merged 2 commits into from
Apr 3, 2019

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Apr 2, 2019

Assuming that this.notifyPropertyChange is a method on the object that the sort is operating on is not a safe assumption. Specifically, when operating on a @glimmer/component (which is essentially just a very very basic native class) there is no notifyPropertyChange method and an error was thrown.

Fixes #17839

This refactors the `sort` reduced computed macro tests in order to
easily test both an Ember.Object and a native class.
Assuming that `this.notifyPropertyChange` is a method on the object that
the `sort` is operating on is not a safe assumption. Specifically, when
operating on a `@glimmer/component` (which is _essentially_ just a very
very basic native class) there is no `notifyPropertyChange` method and
an error was thrown.
@pzuraq pzuraq merged commit 4b099ee into emberjs:master Apr 3, 2019
@rwjblue rwjblue deleted the fix-sort branch April 3, 2019 15:56
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.

None yet

2 participants