Skip to content

Commit

Permalink
Notify on length when many-array changes
Browse files Browse the repository at this point in the history
  • Loading branch information
richgt committed Feb 22, 2023
1 parent 8295458 commit c81270c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/model/addon/-private/system/many-array.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default EmberObject.extend(MutableArray, DeprecatedEvented, {

/**
* Retrieve the links for this relationship
*
*
@property {Object | null} links
@public
*/
Expand Down Expand Up @@ -172,6 +172,7 @@ export default EmberObject.extend(MutableArray, DeprecatedEvented, {
} else {
this._hasNotified = true;
this.notifyPropertyChange('[]');
this.notifyPropertyChange('length');
this.notifyPropertyChange('firstObject');
this.notifyPropertyChange('lastObject');
}
Expand Down Expand Up @@ -314,7 +315,7 @@ export default EmberObject.extend(MutableArray, DeprecatedEvented, {
```javascript
let user = store.peekRecord('user', '1')
await login(user);
let permissions = await user.permissions;
await permissions.reload();
```
Expand Down

0 comments on commit c81270c

Please sign in to comment.