recycling => shouldRecycle, Fix #1992 (#1993)

* Fix #1992

* doc in changelog

* add test for #1992
This commit is contained in:
valtron 2017-10-16 00:38:44 -06:00 committed by Pierre-Yves Gérardy
parent 0691662fd4
commit 622e009811
3 changed files with 25 additions and 1 deletions

View file

@ -235,7 +235,7 @@ module.exports = function($window) {
if (oldIndex != null) {
var movable = old[oldIndex]
var shouldRecycle = (pool != null && oldIndex >= old.length - pool.length) || ((pool == null) && recycling)
updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), recycling, ns)
updateNode(parent, movable, v, hooks, getNextSibling(old, oldEnd + 1, nextSibling), shouldRecycle, ns)
insertNode(parent, toFragment(movable), nextSibling)
old[oldIndex].skip = true
if (movable.dom != null) nextSibling = movable.dom