wip(vapor): fix setScopeId for vdom in vapor

This commit is contained in:
Evan You 2025-02-04 21:55:32 +08:00
parent c3e4f6621c
commit 4b12529878
No known key found for this signature in database
GPG Key ID: 00E9AB7A6704CE0A
1 changed files with 4 additions and 4 deletions

View File

@ -759,8 +759,8 @@ function baseCreateRenderer(
hostSetScopeId(el, slotScopeIds[i])
}
}
if (parentComponent) {
let subTree = parentComponent.subTree
let subTree = parentComponent && parentComponent.subTree
if (subTree) {
if (
__DEV__ &&
subTree.patchFlag > 0 &&
@ -774,13 +774,13 @@ function baseCreateRenderer(
(isSuspense(subTree.type) &&
(subTree.ssContent === vnode || subTree.ssFallback === vnode))
) {
const parentVNode = parentComponent.vnode
const parentVNode = parentComponent!.vnode
setScopeId(
el,
parentVNode,
parentVNode.scopeId,
parentVNode.slotScopeIds,
parentComponent.parent,
parentComponent!.parent,
)
}
}