fix(runtime-core): condition for parent node check should be any different nodes
fix #622
This commit is contained in:
parent
04ac6c467a
commit
c35fea3d60
@ -601,10 +601,9 @@ export function createRenderer<
|
|||||||
// - In the case of a Fragment, we need to provide the actual parent
|
// - In the case of a Fragment, we need to provide the actual parent
|
||||||
// of the Fragment itself so it can move its children.
|
// of the Fragment itself so it can move its children.
|
||||||
oldVNode.type === Fragment ||
|
oldVNode.type === Fragment ||
|
||||||
// - In the case of Comment nodes, this is likely a v-if toggle, which
|
// - In the case of different nodes, there is going to be a replacement
|
||||||
// also needs the correct parent container.
|
// which also requires the correct parent container
|
||||||
oldVNode.type === Comment ||
|
!isSameVNodeType(oldVNode, newVNode) ||
|
||||||
newVNode.type === Comment ||
|
|
||||||
// - In the case of a component, it could contain anything.
|
// - In the case of a component, it could contain anything.
|
||||||
oldVNode.shapeFlag & ShapeFlags.COMPONENT
|
oldVNode.shapeFlag & ShapeFlags.COMPONENT
|
||||||
? hostParentNode(oldVNode.el!)!
|
? hostParentNode(oldVNode.el!)!
|
||||||
@ -613,7 +612,7 @@ export function createRenderer<
|
|||||||
fallbackContainer
|
fallbackContainer
|
||||||
patch(
|
patch(
|
||||||
oldVNode,
|
oldVNode,
|
||||||
newChildren[i],
|
newVNode,
|
||||||
container,
|
container,
|
||||||
null,
|
null,
|
||||||
parentComponent,
|
parentComponent,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user