Skip to content

Commit 93fb4df

Browse files
committed
position transition guard properly to fix e2e modal test case
1 parent d867b9e commit 93fb4df

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ export function enter (vnode: VNodeWithData) {
2020
el._leaveCb()
2121
}
2222

23-
if (el._enterCb) {
23+
const data = resolveTransition(vnode.data.transition)
24+
if (!data) {
2425
return
2526
}
2627

27-
const data = resolveTransition(vnode.data.transition)
28-
if (!data) {
28+
/* istanbul ignore if */
29+
if (el._enterCb) {
2930
return
3031
}
3132

@@ -116,15 +117,16 @@ export function leave (vnode: VNodeWithData, rm: Function) {
116117
el._enterCb()
117118
}
118119

119-
if (el._leaveCb) {
120-
return
121-
}
122-
123120
const data = resolveTransition(vnode.data.transition)
124121
if (!data) {
125122
return rm()
126123
}
127124

125+
/* istanbul ignore if */
126+
if (el._leaveCb) {
127+
return
128+
}
129+
128130
const {
129131
css,
130132
leaveClass,

0 commit comments

Comments
 (0)