target,
props,
} = vnode
-
- if (target) {
- hostRemove(targetStart!)
- hostRemove(targetAnchor!)
- }
-
// an unmounted teleport should always unmount its children whether it's disabled or not
doRemove && hostRemove(anchor!)
const disabled = isTeleportDisabled(props)
if (!disabled && !target) return
+ if (target) {
+ hostRemove(targetStart!)
+ hostRemove(targetAnchor!)
+ }
+
if (shapeFlag & ShapeFlags.ARRAY_CHILDREN) {
const shouldRemove = doRemove || !disabled
for (let i = 0; i < (children as VNode[]).length; i++) {