Skip to content

Commit 819e3ce

Browse files
committed
avoid calling duplicate enter/leave when already in transition (fix #3252)
1 parent f0aef75 commit 819e3ce

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/platforms/web/runtime/modules/transition.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export function enter (vnode: VNodeWithData) {
2020
el._leaveCb()
2121
}
2222

23+
if (el._enterCb) {
24+
return
25+
}
26+
2327
const data = resolveTransition(vnode.data.transition)
2428
if (!data) {
2529
return
@@ -112,6 +116,10 @@ export function leave (vnode: VNodeWithData, rm: Function) {
112116
el._enterCb()
113117
}
114118

119+
if (el._leaveCb) {
120+
return
121+
}
122+
115123
const data = resolveTransition(vnode.data.transition)
116124
if (!data) {
117125
return rm()

0 commit comments

Comments
 (0)