]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix: properly handle advance hydration node
authordaiwei <daiwei521@126.com>
Wed, 30 Jul 2025 10:22:06 +0000 (18:22 +0800)
committerdaiwei <daiwei521@126.com>
Wed, 30 Jul 2025 10:22:06 +0000 (18:22 +0800)
packages/runtime-vapor/src/dom/hydration.ts

index 2802b2860d55e0e3a206da771d511376f791afaa..68c6687f961eca6cb868c6e5d88074c656366ce1 100644 (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