-
-
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 beta] Observers after Dependent Key Change
Currently when a property is overriden in an extended class and its dependent keys change, observers watching that property will still fire for changes made to the old set of dependent keys. ```js var count = 0; var MyClass = Ember.Object.extend({ prop1: 'foo', content: Ember.computed.alias('prop1'), incrementCount: Ember.observer('content', function () { count++; }) }); var obj = MyClass.extend({ prop2: Ember.computed.alias('prop1'), content: Ember.computed.alias('prop2') // redefine content with diff depKey }).create(); Ember.run(function() { obj.set('prop1', 'bar'); }); // assert(count === 1); // Fails, should be 1 but in fact is 2 ```
- Loading branch information
1 parent
af8ed04
commit 75a7ba3
Showing
2 changed files
with
39 additions
and
0 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