Skip to content

Commit

Permalink
fix(Transition): avoid applying transition hooks on comment vnode (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 authored Sep 4, 2024
1 parent bc63df0 commit 51912f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/runtime-core/src/components/BaseTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 51912f8

Please sign in to comment.