@@ -50,15 +50,15 @@ export class History {
50
50
} , replace )
51
51
}
52
52
53
- confirmTransition ( location : Route , cb : Function , replace ? : boolean ) {
54
- if ( isSameRoute ( location , this . current ) ) {
53
+ confirmTransition ( route : Route , cb : Function , replace ? : boolean ) {
54
+ if ( isSameRoute ( route , this . current ) ) {
55
55
return
56
56
}
57
57
58
58
const {
59
59
deactivated,
60
60
activated
61
- } = resolveQueue ( this . current . matched , location . matched )
61
+ } = resolveQueue ( this . current . matched , route . matched )
62
62
63
63
const queue = this . beforeHooks . concat (
64
64
// route config canDeactivate hooks
@@ -71,18 +71,18 @@ export class History {
71
71
extractComponentHooks ( activated , 'routeCanActivate' )
72
72
) . filter ( _ => _ )
73
73
74
- this . pending = location
74
+ this . pending = route
75
75
const redirect = replace
76
76
? location => this . replace ( location )
77
77
: location => this . push ( location )
78
78
79
79
runQueue (
80
80
queue ,
81
- ( hook , next ) => { hook ( location , redirect , next ) } ,
81
+ ( hook , next ) => { hook ( route , redirect , next ) } ,
82
82
( ) => {
83
- if ( isSameRoute ( location , this . pending ) ) {
83
+ if ( isSameRoute ( route , this . pending ) ) {
84
84
this . pending = null
85
- cb ( location )
85
+ cb ( route )
86
86
}
87
87
}
88
88
)
0 commit comments