-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX release] Ensure
_actions
specified to extend works.
The initial deprecation of `_actions` and moving it to `actions` was a bit too naive. The `deprecateProperty` helper was used, which meant that when `_actions` was set, it would call `set(this, 'actions', newValue)`. This meant that passing `_actions` to `Ember.Route.extend` (or `.reopen`) resulted in the `_actions` completely clobbering `actions` (and loosing any previously defined actions there). The fix was to: * Replace the generic `deprecateProperty` usage with a custom `Object.defineProperty` call, that defines a setter with an assertion instead of clobbering. * Implementing a `willMergeMixin` that mutates the `props` at extend time (to ensure that `_actions` is moved to `actions` with a deprecation). (cherry picked from commit dcc0dc3)
- Loading branch information
Showing
2 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters