Permalink
Browse files

Moved order of operations so that children array observers are set up

before changes actually happen, this way we don't have to manually
dispatch the change events ourselves.
  • Loading branch information...
1 parent 50d2011 commit 6e5e4dc0a4bbe11d9647b6328bc0066490d4969b @krotscheck krotscheck committed Apr 5, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 frameworks/datastore/system/child_array.js
@@ -170,13 +170,11 @@ SC.ChildArray = SC.Object.extend(SC.Enumerable, SC.Array,
cr, recordType;
newRecs = this._processRecordsToHashes(recs);
- children.replace(idx, amt, newRecs);
// notify that the record did change...
if (newRecs !== this._prevChildren){
this._performRecordPropertyChange(null, false);
- this.arrayContentWillChange(idx, amt, len);
- this._childrenContentDidChange(idx, amt, len);
}
+ children.replace(idx, amt, newRecs);
record.recordDidChange(pname);
return this;

0 comments on commit 6e5e4dc

Please sign in to comment.