Skip to content

Commit 4201c9d

Browse files
committed
fix abstract history go() (fix #726)
1 parent 955f377 commit 4201c9d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/history/abstract.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class AbstractHistory extends History {
1010
constructor (router: VueRouter) {
1111
super(router)
1212
this.stack = []
13-
this.index = 0
13+
this.index = -1
1414
}
1515

1616
push (location: RawLocation) {
@@ -31,10 +31,10 @@ export class AbstractHistory extends History {
3131
if (targetIndex < 0 || targetIndex >= this.stack.length) {
3232
return
3333
}
34-
const location = this.stack[targetIndex]
35-
this.confirmTransition(location, () => {
34+
const route = this.stack[targetIndex]
35+
this.confirmTransition(route, () => {
3636
this.index = targetIndex
37-
this.updateRoute(location)
37+
this.updateRoute(route)
3838
})
3939
}
4040

0 commit comments

Comments
 (0)