Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 789b7f2

Browse files
authored
fix(runtime-vapor): add a non-null check for parentComponent (#14666)
1 parent 606e1d6 commit 789b7f2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/runtime-vapor/src/vdomInterop.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ const vaporInteropImpl: Omit<
188188
ensureVNodeHookState(instance, vnode)
189189

190190
// copy the shape flag from the vdom component if inside a keep-alive
191-
if (isKeepAlive(parentComponent)) instance.shapeFlag = vnode.shapeFlag
191+
if (parentComponent && isKeepAlive(parentComponent))
192+
instance.shapeFlag = vnode.shapeFlag
192193

193194
if (vnode.transition) {
194195
setVaporTransitionHooks(

0 commit comments

Comments
 (0)