From: edison Date: Wed, 4 Sep 2024 12:54:04 +0000 (+0800) Subject: fix(Transition): avoid applying transition hooks on comment vnode (#11788) X-Git-Tag: v3.5.1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51912f8a02e35f172f6d30ed7a2f3a92c1407cf9;p=thirdparty%2Fvuejs%2Fcore.git fix(Transition): avoid applying transition hooks on comment vnode (#11788) close #11782 --- diff --git a/packages/runtime-core/src/components/BaseTransition.ts b/packages/runtime-core/src/components/BaseTransition.ts index a31f28b238..37534ad699 100644 --- a/packages/runtime-core/src/components/BaseTransition.ts +++ b/packages/runtime-core/src/components/BaseTransition.ts @@ -193,7 +193,10 @@ const BaseTransitionImpl: ComponentOptions = { // #11061, ensure enterHooks is fresh after clone hooks => (enterHooks = hooks), ) - setTransitionHooks(innerChild, enterHooks) + + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks) + } const oldChild = instance.subTree const oldInnerChild = oldChild && getInnerChild(oldChild)