Skip to content

Commit b14f7c8

Browse files
atinuxyyx990803
authored andcommitted
Add base in abstract mode (fix #983) (#1045)
* Add base in abstract mode * Abtract mode give base in 2nd argument
1 parent de0d97d commit b14f7c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/history/abstract.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export class AbstractHistory extends History {
77
index: number;
88
stack: Array<Route>;
99

10-
constructor (router: VueRouter) {
11-
super(router)
10+
constructor (router: VueRouter, base: ?string) {
11+
super(router, base)
1212
this.stack = []
1313
this.index = -1
1414
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class VueRouter {
4848
this.history = new HashHistory(this, options.base, this.fallback)
4949
break
5050
case 'abstract':
51-
this.history = new AbstractHistory(this)
51+
this.history = new AbstractHistory(this, options.base)
5252
break
5353
default:
5454
process.env.NODE_ENV !== 'production' && assert(false, `invalid mode: ${mode}`)

0 commit comments

Comments
 (0)