mirror of https://github.com/vuejs/core.git
fix: advance hydration node in vdom interop
This commit is contained in:
parent
f2cdbe0387
commit
268383f760
|
@ -52,11 +52,11 @@ import { __next, createTextNode } from './dom/node'
|
||||||
import { optimizePropertyLookup } from './dom/prop'
|
import { optimizePropertyLookup } from './dom/prop'
|
||||||
import { setTransitionHooks as setVaporTransitionHooks } from './components/Transition'
|
import { setTransitionHooks as setVaporTransitionHooks } from './components/Transition'
|
||||||
import {
|
import {
|
||||||
|
advanceHydrationNode,
|
||||||
currentHydrationNode,
|
currentHydrationNode,
|
||||||
isHydrating,
|
isHydrating,
|
||||||
locateHydrationNode,
|
locateHydrationNode,
|
||||||
locateVaporFragmentAnchor,
|
locateVaporFragmentAnchor,
|
||||||
setCurrentHydrationNode,
|
|
||||||
hydrateNode as vaporHydrateNode,
|
hydrateNode as vaporHydrateNode,
|
||||||
} from './dom/hydration'
|
} from './dom/hydration'
|
||||||
import { VaporFragment, isFragment, setFragmentFallback } from './fragment'
|
import { VaporFragment, isFragment, setFragmentFallback } from './fragment'
|
||||||
|
@ -374,12 +374,11 @@ function renderVDOMSlot(
|
||||||
)
|
)
|
||||||
} else if (isHydrating) {
|
} else if (isHydrating) {
|
||||||
// update hydration node to the next sibling of the slot anchor
|
// update hydration node to the next sibling of the slot anchor
|
||||||
locateHydrationNode()
|
|
||||||
const nextNode = locateVaporFragmentAnchor(
|
const nextNode = locateVaporFragmentAnchor(
|
||||||
currentHydrationNode!,
|
currentHydrationNode!,
|
||||||
'slot',
|
'slot',
|
||||||
)
|
)
|
||||||
if (nextNode) setCurrentHydrationNode(__next(nextNode))
|
if (nextNode) advanceHydrationNode(nextNode)
|
||||||
}
|
}
|
||||||
oldVNode = null
|
oldVNode = null
|
||||||
}
|
}
|
||||||
|
@ -473,5 +472,5 @@ function hydrateVNode(
|
||||||
null,
|
null,
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
setCurrentHydrationNode(nextNode)
|
if (nextNode) advanceHydrationNode(nextNode)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue