@@ -40,20 +40,19 @@ module.exports = {
40
40
this . template = _ . extractContent ( this . el , true )
41
41
}
42
42
// component resolution related state
43
- this . _pendingCb =
43
+ this . pendingComponentCb =
44
44
this . componentID =
45
45
this . Component = null
46
+ // transition related state
47
+ this . pendingRemovals = 0
48
+ this . pendingRemovalCb = null
46
49
// if static, build right now.
47
50
if ( ! this . _isDynamicLiteral ) {
48
51
this . resolveComponent ( this . expression , _ . bind ( this . initStatic , this ) )
49
52
} else {
50
53
// check dynamic component params
51
54
this . transMode = this . _checkParam ( 'transition-mode' )
52
55
}
53
-
54
- this . pendingRemovals = 0
55
- this . pendingRemovalCb = null
56
-
57
56
} else {
58
57
process . env . NODE_ENV !== 'production' && _ . warn (
59
58
'cannot mount component "' + this . expression + '" ' +
@@ -132,12 +131,12 @@ module.exports = {
132
131
133
132
resolveComponent : function ( id , cb ) {
134
133
var self = this
135
- this . _pendingCb = _ . cancellable ( function ( component ) {
134
+ this . pendingComponentCb = _ . cancellable ( function ( component ) {
136
135
self . componentID = id
137
136
self . Component = component
138
137
cb ( )
139
138
} )
140
- this . vm . _resolveComponent ( id , this . _pendingCb )
139
+ this . vm . _resolveComponent ( id , this . pendingComponentCb )
141
140
} ,
142
141
143
142
/**
@@ -147,9 +146,9 @@ module.exports = {
147
146
*/
148
147
149
148
invalidatePending : function ( ) {
150
- if ( this . _pendingCb ) {
151
- this . _pendingCb . cancel ( )
152
- this . _pendingCb = null
149
+ if ( this . pendingComponentCb ) {
150
+ this . pendingComponentCb . cancel ( )
151
+ this . pendingComponentCb = null
153
152
}
154
153
} ,
155
154
@@ -221,7 +220,7 @@ module.exports = {
221
220
// we may have a component switch when a previous
222
221
// component is still being transitioned out.
223
222
// we want to trigger only one lastest insertion cb
224
- // when the existing transition finishes.
223
+ // when the existing transition finishes. (#1119)
225
224
this . pendingRemovals ++
226
225
this . pendingRemovalCb = cb
227
226
var self = this
0 commit comments