File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/platforms/web/runtime/components Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -60,15 +60,18 @@ export default {
60
60
const oldChild = getRealChild ( oldRawChild )
61
61
if ( mode && oldChild && oldChild . data && oldChild . key !== child . key ) {
62
62
if ( mode === 'out-in' ) {
63
- // return old node
64
- // and queue an update when the leave finishes
65
- if ( ! oldChild . elm . _leaveCb && oldRawChild . data . transition ) {
63
+ if (
64
+ ! oldChild . elm . _leaveCb && // not already leaving
65
+ oldChild . data . transition // not already left
66
+ ) {
66
67
leave ( oldChild , ( ) => {
67
- oldRawChild . data . transition = null
68
+ // mark left & avoid triggering leave transition again
69
+ oldChild . data . transition = null
68
70
this . $forceUpdate ( )
69
71
} )
70
72
}
71
- if ( oldRawChild . data . transition ) {
73
+ // return old node if not left yet
74
+ if ( oldChild . data . transition ) {
72
75
return oldRawChild
73
76
}
74
77
} else if ( mode === 'in-out' ) {
You can’t perform that action at this time.
0 commit comments