File tree 1 file changed +6
-3
lines changed
src/platforms/web/runtime/components
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ function hasParentTransition (vnode) {
62
62
}
63
63
}
64
64
65
+ function isSameChild ( child , oldChild ) {
66
+ return oldChild . key === child . key && oldChild . tag === child . tag
67
+ }
68
+
65
69
export default {
66
70
name : 'transition' ,
67
71
props : transitionProps ,
@@ -126,11 +130,10 @@ export default {
126
130
const oldRawChild = this . _vnode
127
131
const oldChild : any = getRealChild ( oldRawChild )
128
132
129
- if ( oldChild && oldChild . data && oldChild . key !== key ) {
133
+ if ( oldChild && oldChild . data && ! isSameChild ( child , oldChild ) ) {
130
134
// replace old child transition data with fresh one
131
135
// important for dynamic transitions!
132
- const oldData = oldChild . data . transition = extend ( { } , data )
133
-
136
+ const oldData = oldChild && ( oldChild . data . transition = extend ( { } , data ) )
134
137
// handle transition mode
135
138
if ( mode === 'out-in' ) {
136
139
// return placeholder node and queue update when leave finishes
You can’t perform that action at this time.
0 commit comments