From b5a709f3f19cc9535150bab0180d35bcc3e0ea88 Mon Sep 17 00:00:00 2001 From: BIMiracle <18730979+BIMiracle@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:14:03 +0800 Subject: [PATCH] fix(runtime-core): optimize judgment --- packages/runtime-core/src/components/BaseTransition.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/components/BaseTransition.ts b/packages/runtime-core/src/components/BaseTransition.ts index e99fe0e496c..ef05970522c 100644 --- a/packages/runtime-core/src/components/BaseTransition.ts +++ b/packages/runtime-core/src/components/BaseTransition.ts @@ -364,7 +364,7 @@ export function resolveTransitionHooks( if ( leavingVNode && isSameVNodeType(vnode, leavingVNode) && - (leavingVNode.el as TransitionElement)[leaveCbKey] + (leavingVNode.el as TransitionElement)?.[leaveCbKey] ) { // force early removal (not cancelled) ;(leavingVNode.el as TransitionElement)[leaveCbKey]!()