diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index 3d86f0f2..fcc22897 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -207,6 +207,15 @@ export function createHydrationFunctions( ? locateClosingAsyncAnchor(node) : nextSibling(node) + // #4293 teleport as component root + if ( + nextNode && + isComment(nextNode) && + nextNode.data === 'teleport end' + ) { + nextNode = nextSibling(nextNode) + } + // #3787 // if component is async, it may get moved / unmounted before its // inner component is loaded, so we need to give it a placeholder