Skip to content

Commit

Permalink
Add base in abstract mode (fix #983) (#1045)
Browse files Browse the repository at this point in the history
* Add base in abstract mode

* Abtract mode give base in 2nd argument
  • Loading branch information
atinux authored and yyx990803 committed Dec 23, 2016
1 parent de0d97d commit b14f7c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/history/abstract.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export class AbstractHistory extends History {
index: number;
stack: Array<Route>;

constructor (router: VueRouter) {
super(router)
constructor (router: VueRouter, base: ?string) {
super(router, base)
this.stack = []
this.index = -1
}
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class VueRouter {
this.history = new HashHistory(this, options.base, this.fallback)
break
case 'abstract':
this.history = new AbstractHistory(this)
this.history = new AbstractHistory(this, options.base)
break
default:
process.env.NODE_ENV !== 'production' && assert(false, `invalid mode: ${mode}`)
Expand Down

0 comments on commit b14f7c8

Please sign in to comment.