fix(ssr): fix hydration error when teleport is used as component root
fix #4293
This commit is contained in:
parent
fd2aa120a1
commit
b60cff052c
@ -207,6 +207,15 @@ export function createHydrationFunctions(
|
|||||||
? locateClosingAsyncAnchor(node)
|
? locateClosingAsyncAnchor(node)
|
||||||
: nextSibling(node)
|
: nextSibling(node)
|
||||||
|
|
||||||
|
// #4293 teleport as component root
|
||||||
|
if (
|
||||||
|
nextNode &&
|
||||||
|
isComment(nextNode) &&
|
||||||
|
nextNode.data === 'teleport end'
|
||||||
|
) {
|
||||||
|
nextNode = nextSibling(nextNode)
|
||||||
|
}
|
||||||
|
|
||||||
// #3787
|
// #3787
|
||||||
// if component is async, it may get moved / unmounted before its
|
// if component is async, it may get moved / unmounted before its
|
||||||
// inner component is loaded, so we need to give it a placeholder
|
// inner component is loaded, so we need to give it a placeholder
|
||||||
|
Loading…
Reference in New Issue
Block a user