Skip to content

Commit

Permalink
Merge remote-tracking branch 'juggy/ember-13'
Browse files Browse the repository at this point in the history
# Conflicts:
#	ember-model.js
#	packages/ember-model/lib/has_many_array.js
  • Loading branch information
Paul Oliver committed Nov 20, 2015
2 parents b3ae068 + 19b6db2 commit 71ba340
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions ember-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,22 +381,22 @@ Ember.ManyArray = Ember.RecordArray.extend({
this._super(index, removed, added);
},

_contentWillChange: function() {
_contentDidChange: function() {
var content = get(this, 'content');
var contentPrev = this._content;

if (content) {
this.arrayWillChange(content, 0, get(content, 'length'), 0);
content.removeArrayObserver(this);
if (contentPrev && contentPrev !== content) {
this.arrayWillChange(contentPrev, 0, get(contentPrev, 'length'), 0);
contentPrev.removeArrayObserver(this);
this._setupOriginalContent(content);
}
}.observesBefore('content'),

_contentDidChange: function() {
var content = get(this, 'content');
if (content) {
content.addArrayObserver(this);
this.arrayDidChange(content, 0, 0, get(content, 'length'));
}

this._content = content;
}.observes('content'),

arrayWillChange: function(item, idx, removedCnt, addedCnt) {
Expand Down Expand Up @@ -2202,11 +2202,4 @@ Ember.onLoad('Ember.Application', function(Application) {
});


})();

(function() {




})();
2 changes: 1 addition & 1 deletion packages/ember-model/lib/has_many_array.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Ember.ManyArray = Ember.RecordArray.extend({
this._super(index, removed, added);
},

_contentDidChange: function() {
_contentDidChange: function() {
var content = get(this, 'content');
var contentPrev = this._content;

Expand Down

0 comments on commit 71ba340

Please sign in to comment.