Skip to content
Permalink
Browse files
fix(ssr): fix hydration error when teleport is used as component root
fix #4293
  • Loading branch information
yyx990803 committed May 18, 2022
1 parent fd2aa12 commit b60cff052c880b2965d06007f0ec4d0349ab47c0
Showing 1 changed file with 9 additions and 0 deletions.
@@ -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

0 comments on commit b60cff0

Please sign in to comment.