Skip to content

Commit

Permalink
_removeInstance -> _detachAndRemoveInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Nov 5, 2015
1 parent f447c0e commit ba7a16f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/template/dom-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@
}
// Remove any extra instances from previous state
for (var j=this._instances.length-1; j>=i; j--) {
this._removeInstance(j);
this._detachAndRemoveInstance(j);
}
},

Expand Down Expand Up @@ -544,7 +544,7 @@
var idx = removedIdxs[i];
// Removed idx may be undefined if item was previously filtered out
if (idx !== undefined) {
this._removeInstance(idx);
this._detachAndRemoveInstance(idx);
}
}
}
Expand Down Expand Up @@ -606,7 +606,7 @@
splices.forEach(function(s) {
// Detach & pool removed instances
for (var i=0; i<s.removed.length; i++) {
this._removeInstance(s.index);
this._detachAndRemoveInstance(s.index);
}
for (var i=0; i<s.addedKeys.length; i++) {
this._insertPlaceholder(s.index+i, s.addedKeys[i]);
Expand All @@ -632,7 +632,7 @@
}
},

_removeInstance: function(idx) {
_detachAndRemoveInstance: function(idx) {
var inst = this._detachInstance(idx);
if (inst) {
this._pool.push(inst);
Expand Down

0 comments on commit ba7a16f

Please sign in to comment.