]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix: advance hydration node in vdom interop
authordaiwei <daiwei521@126.com>
Fri, 1 Aug 2025 09:24:03 +0000 (17:24 +0800)
committerdaiwei <daiwei521@126.com>
Fri, 1 Aug 2025 09:24:03 +0000 (17:24 +0800)
packages/runtime-vapor/src/vdomInterop.ts

index ff1da72f2b23fe3f9383abe8fc3d4eef84389ed4..d16c73127d2475d7610db69f3507dbb807cbd332 100644 (file)
@@ -52,11 +52,11 @@ import { __next, createTextNode } from './dom/node'
 import { optimizePropertyLookup } from './dom/prop'
 import { setTransitionHooks as setVaporTransitionHooks } from './components/Transition'
 import {
+  advanceHydrationNode,
   currentHydrationNode,
   isHydrating,
   locateHydrationNode,
   locateVaporFragmentAnchor,
-  setCurrentHydrationNode,
   hydrateNode as vaporHydrateNode,
 } from './dom/hydration'
 import { VaporFragment, isFragment, setFragmentFallback } from './fragment'
@@ -374,12 +374,11 @@ function renderVDOMSlot(
             )
           } else if (isHydrating) {
             // update hydration node to the next sibling of the slot anchor
-            locateHydrationNode()
             const nextNode = locateVaporFragmentAnchor(
               currentHydrationNode!,
               'slot',
             )
-            if (nextNode) setCurrentHydrationNode(__next(nextNode))
+            if (nextNode) advanceHydrationNode(nextNode)
           }
           oldVNode = null
         }
@@ -473,5 +472,5 @@ function hydrateVNode(
     null,
     false,
   )
-  setCurrentHydrationNode(nextNode)
+  if (nextNode) advanceHydrationNode(nextNode)
 }