Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data Adapter: Only trigger model type update if the record live array…
… count actually changed Fixes emberjs/ember-inspector#690 The issue: In some cases, Ember Data's `peekAll` triggers `arrayContentDidChange` on the record array manager's live record array even if the records didn't change. One example case is when we call `unloadRecord` and then `peekAll` within the same run loop. The `peekAll` will trigger the array observer's `didChange` callback (with zero changes). This is generally harmless as long as we guard against that in our data adapter. Without the guard, we risk causing an infinite recursion because our `didChange` observer itself calls `peekAll`, which in the above scenario will re-trigger the observer and so on. (cherry picked from commit 7bd47da)
- Loading branch information