fix: properly handle advance hydration node

This commit is contained in:
daiwei 2025-07-30 18:22:06 +08:00
parent 9e16723663
commit bcdcc673ec
1 changed files with 3 additions and 1 deletions

View File

@ -21,7 +21,9 @@ export function setCurrentHydrationNode(node: Node | null): void {
}
export function advanceHydrationNode(node: Node): void {
setCurrentHydrationNode(node.nextSibling || node.parentNode)
setCurrentHydrationNode(
node.nextSibling || (node.parentNode ? node.parentNode.nextSibling : null),
)
}
let isOptimized = false