Skip to content

Commit 550e3cc

Browse files
committed
tweak
1 parent 2202588 commit 550e3cc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: src/history/base.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ export class History {
5050
}, replace)
5151
}
5252

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)) {
5555
return
5656
}
5757

5858
const {
5959
deactivated,
6060
activated
61-
} = resolveQueue(this.current.matched, location.matched)
61+
} = resolveQueue(this.current.matched, route.matched)
6262

6363
const queue = this.beforeHooks.concat(
6464
// route config canDeactivate hooks
@@ -71,18 +71,18 @@ export class History {
7171
extractComponentHooks(activated, 'routeCanActivate')
7272
).filter(_ => _)
7373

74-
this.pending = location
74+
this.pending = route
7575
const redirect = replace
7676
? location => this.replace(location)
7777
: location => this.push(location)
7878

7979
runQueue(
8080
queue,
81-
(hook, next) => { hook(location, redirect, next) },
81+
(hook, next) => { hook(route, redirect, next) },
8282
() => {
83-
if (isSameRoute(location, this.pending)) {
83+
if (isSameRoute(route, this.pending)) {
8484
this.pending = null
85-
cb(location)
85+
cb(route)
8686
}
8787
}
8888
)

0 commit comments

Comments
 (0)