File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,11 @@ export class HashHistory extends History {
55
55
56
56
replace ( location : RawLocation , onComplete ? : Function , onAbort ? : Function ) {
57
57
const { current : fromRoute } = this
58
- if ( typeof location === 'string' ) {
59
- location = { path :location }
58
+ if ( typeof location === 'string' ) {
59
+ location = { path : location }
60
60
}
61
- if ( typeof location === 'object' && ! location . replace ) {
62
- location . replace = 1
61
+ if ( typeof location === 'object' && ! location . replace ) {
62
+ ( location : Object ) . replace = true
63
63
}
64
64
this . transitionTo ( location , route => {
65
65
replaceHash ( route . fullPath )
Original file line number Diff line number Diff line change @@ -52,11 +52,11 @@ export class HTML5History extends History {
52
52
53
53
replace ( location : RawLocation , onComplete ? : Function , onAbort ? : Function ) {
54
54
const { current : fromRoute } = this
55
- if ( typeof location === 'string' ) {
56
- location = { path :location }
55
+ if ( typeof location === 'string' ) {
56
+ location = { path : location }
57
57
}
58
- if ( typeof location === 'object' && ! location . replace ) {
59
- location . replace = 1
58
+ if ( typeof location === 'object' && ! location . replace ) {
59
+ ( location : Object ) . replace = true
60
60
}
61
61
this . transitionTo ( location , route => {
62
62
replaceState ( cleanPath ( this . base + route . fullPath ) )
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export function createRoute (
23
23
meta : ( record && record . meta ) || { } ,
24
24
path : location . path || '/' ,
25
25
hash : location . hash || '' ,
26
- replace : location . replace || 0 ,
26
+ replace : location . replace || false ,
27
27
query,
28
28
params : location . params || { } ,
29
29
fullPath : getFullPath ( location , stringifyQuery ) ,
You can’t perform that action at this time.
0 commit comments