diff --git a/packages/runtime-core/src/components/Teleport.ts b/packages/runtime-core/src/components/Teleport.ts index 8091f014408..9d8034684df 100644 --- a/packages/runtime-core/src/components/Teleport.ts +++ b/packages/runtime-core/src/components/Teleport.ts @@ -314,9 +314,8 @@ function hydrateTeleport( optimized ) } - ;(target as TeleportTargetElement)._lpa = nextSibling( - vnode.targetAnchor as Node - ) + ;(target as TeleportTargetElement)._lpa = + vnode.targetAnchor && nextSibling(vnode.targetAnchor as Node) } } return vnode.anchor && nextSibling(vnode.anchor as Node)