@@ -51,10 +51,12 @@ export function enter (vnode: VNodeWithData) {
51
51
// transition. One edge case to check is when the <transition> is placed
52
52
// as the root node of a child component. In that case we need to check
53
53
// <transition>'s parent for appear check.
54
- const transitionNode = activeInstance . $vnode
55
- const context = transitionNode && transitionNode . parent
56
- ? transitionNode . parent . context
57
- : activeInstance
54
+ let context = activeInstance
55
+ let transitionNode = activeInstance . $vnode
56
+ while ( transitionNode && transitionNode . parent ) {
57
+ transitionNode = transitionNode . parent
58
+ context = transitionNode . context
59
+ }
58
60
59
61
const isAppear = ! context . _isMounted || ! vnode . isRootInsert
60
62
@@ -96,7 +98,10 @@ export function enter (vnode: VNodeWithData) {
96
98
mergeVNodeHook ( vnode . data . hook || ( vnode . data . hook = { } ) , 'insert' , ( ) => {
97
99
const parent = el . parentNode
98
100
const pendingNode = parent && parent . _pending && parent . _pending [ vnode . key ]
99
- if ( pendingNode && pendingNode . tag === vnode . tag && pendingNode . elm . _leaveCb ) {
101
+ if ( pendingNode &&
102
+ pendingNode . context === vnode . context &&
103
+ pendingNode . tag === vnode . tag &&
104
+ pendingNode . elm . _leaveCb ) {
100
105
pendingNode . elm . _leaveCb ( )
101
106
}
102
107
enterHook && enterHook ( el , cb )
0 commit comments