Skip to content

Commit 51912f8

Browse files
authoredSep 4, 2024··
fix(Transition): avoid applying transition hooks on comment vnode (#11788)
close #11782
1 parent bc63df0 commit 51912f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎packages/runtime-core/src/components/BaseTransition.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ const BaseTransitionImpl: ComponentOptions = {
193193
// #11061, ensure enterHooks is fresh after clone
194194
hooks => (enterHooks = hooks),
195195
)
196-
setTransitionHooks(innerChild, enterHooks)
196+
197+
if (innerChild.type !== Comment) {
198+
setTransitionHooks(innerChild, enterHooks)
199+
}
197200

198201
const oldChild = instance.subTree
199202
const oldInnerChild = oldChild && getInnerChild(oldChild)

0 commit comments

Comments
 (0)
Please sign in to comment.