render/updateNodes: call toFragment on the new vnodes, solves issues with actual fragments (fix #1991 partim 2)
This commit is contained in:
parent
39ff8d7217
commit
9c835f4eac
1 changed files with 4 additions and 4 deletions
|
|
@ -214,7 +214,7 @@ module.exports = function($window) {
|
||||||
} else if (o.key === v.key) {
|
} else if (o.key === v.key) {
|
||||||
oldStart++, start++
|
oldStart++, start++
|
||||||
updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
updateNode(parent, o, v, hooks, getNextSibling(old, oldStart, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
||||||
if (oFromPool && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
|
if (oFromPool && o.tag === v.tag) insertNode(parent, toFragment(v), nextSibling)
|
||||||
} else {
|
} else {
|
||||||
o = old[oldEnd]
|
o = old[oldEnd]
|
||||||
oFromPool = hasPool && oldEnd >= originalOldLength
|
oFromPool = hasPool && oldEnd >= originalOldLength
|
||||||
|
|
@ -223,7 +223,7 @@ module.exports = function($window) {
|
||||||
else if (v == null) start++
|
else if (v == null) start++
|
||||||
else if (o.key === v.key) {
|
else if (o.key === v.key) {
|
||||||
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
||||||
if (oFromPool && o.tag === v.tag || start < end) insertNode(parent, toFragment(o), getNextSibling(old, oldStart, originalOldLength, nextSibling))
|
if (oFromPool && o.tag === v.tag || start < end) insertNode(parent, toFragment(v), getNextSibling(old, oldStart, originalOldLength, nextSibling))
|
||||||
oldEnd--, start++
|
oldEnd--, start++
|
||||||
}
|
}
|
||||||
else break
|
else break
|
||||||
|
|
@ -238,7 +238,7 @@ module.exports = function($window) {
|
||||||
else if (v == null) end--
|
else if (v == null) end--
|
||||||
else if (o.key === v.key) {
|
else if (o.key === v.key) {
|
||||||
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
||||||
if (oFromPool && o.tag === v.tag) insertNode(parent, toFragment(o), nextSibling)
|
if (oFromPool && o.tag === v.tag) insertNode(parent, toFragment(v), nextSibling)
|
||||||
if (o.dom != null) nextSibling = o.dom
|
if (o.dom != null) nextSibling = o.dom
|
||||||
oldEnd--, end--
|
oldEnd--, end--
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -249,7 +249,7 @@ module.exports = function($window) {
|
||||||
o = old[oldIndex]
|
o = old[oldIndex]
|
||||||
oFromPool = hasPool && oldIndex >= originalOldLength
|
oFromPool = hasPool && oldIndex >= originalOldLength
|
||||||
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
updateNode(parent, o, v, hooks, getNextSibling(old, oldEnd + 1, originalOldLength, nextSibling), oFromPool || recyclingParent, ns)
|
||||||
insertNode(parent, toFragment(o), nextSibling)
|
insertNode(parent, toFragment(v), nextSibling)
|
||||||
o.skip = true
|
o.skip = true
|
||||||
if (o.dom != null) nextSibling = o.dom
|
if (o.dom != null) nextSibling = o.dom
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue