fix(runtime-core): use correct container for moving Teleport content (#1703)

This commit is contained in:
underfin
2020-07-28 23:23:39 +08:00
committed by GitHub
parent fbf865d9d4
commit 04a4ebaaeb
3 changed files with 57 additions and 2 deletions

View File

@@ -960,7 +960,8 @@ function baseCreateRenderer(
// which also requires the correct parent container
!isSameVNodeType(oldVNode, newVNode) ||
// - In the case of a component, it could contain anything.
oldVNode.shapeFlag & ShapeFlags.COMPONENT
oldVNode.shapeFlag & ShapeFlags.COMPONENT ||
oldVNode.shapeFlag & ShapeFlags.TELEPORT
? hostParentNode(oldVNode.el!)!
: // In other cases, the parent container is not actually used so we
// just pass the block element here to avoid a DOM parentNode call.