|
|
@@ -25,6 +25,7 @@ import {
|
|
|
isEmitListener,
|
|
|
isKeepAlive,
|
|
|
isVNode,
|
|
|
+ isHydrating as isVdomHydrating,
|
|
|
normalizeRef,
|
|
|
onScopeDispose,
|
|
|
queuePostFlushCb,
|
|
|
@@ -218,6 +219,11 @@ const vaporInteropImpl: Omit<
|
|
|
},
|
|
|
|
|
|
hydrate(vnode, node, container, anchor, parentComponent, parentSuspense) {
|
|
|
+ // Check both vapor's isHydrating (for createVaporSSRApp) and
|
|
|
+ // VDOM's isVdomHydrating (for createSSRApp).
|
|
|
+ // In CSR (createApp/createVaporApp + vaporInteropPlugin), both are false,
|
|
|
+ // so this logic is tree-shaken.
|
|
|
+ if (!isHydrating && !isVdomHydrating) return node
|
|
|
vaporHydrateNode(node, () =>
|
|
|
this.mount(vnode, container, anchor, parentComponent, parentSuspense),
|
|
|
)
|
|
|
@@ -225,6 +231,7 @@ const vaporInteropImpl: Omit<
|
|
|
},
|
|
|
|
|
|
hydrateSlot(vnode, node) {
|
|
|
+ if (!isHydrating && !isVdomHydrating) return node
|
|
|
const { slot } = vnode.vs!
|
|
|
const propsRef = (vnode.vs!.ref = shallowRef(vnode.props))
|
|
|
vaporHydrateNode(node, () => {
|