diff --git a/src/lib/template/dom-repeat.html b/src/lib/template/dom-repeat.html
index 9f8faf98f3..793d49e8d7 100644
--- a/src/lib/template/dom-repeat.html
+++ b/src/lib/template/dom-repeat.html
@@ -328,13 +328,13 @@
}
}
this._splices = [];
- // Update final _keyToInstIdx and inst indices
+ // Update final _keyToInstIdx and instance indices
var keyToIdx = this._keyToInstIdx = {};
var keys = this._keys;
for (var i=0; i=0 ; i--) {
var idx = removedIdxs[i];
@@ -487,7 +487,7 @@
}
// Insert key & inst at insertion point
this._keys.splice(idx, 0, key);
- this._instances.splice(idx, 0, this._insertRow(idx, pool, key));
+ this._instances.splice(idx, 0, this._insertRow(idx, key, pool));
return idx;
},
@@ -527,7 +527,7 @@
// Replace placeholders with actual instances (from pool or newly created)
this._instances.forEach(function(inst, idx) {
if (inst.isPlaceholder) {
- this._instances[idx] = this._insertRow(idx, pool, inst.key);
+ this._instances[idx] = this._insertRow(idx, inst.key, pool);
}
}, this);
},
@@ -544,7 +544,7 @@
return inst;
},
- _insertRow: function(idx, pool, key) {
+ _insertRow: function(idx, key, pool) {
var inst;
if (inst = pool && pool.pop()) {
inst.__setProperty(this.as, this.collection.getItem(key), true);