File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -30,17 +30,19 @@ export class HTML5History extends History {
30
30
}
31
31
32
32
push ( location : RawLocation , onComplete ?: Function , onAbort ?: Function ) {
33
+ const { current : fromRoute } = this
33
34
this . transitionTo ( location , route => {
34
35
pushState ( cleanPath ( this . base + route . fullPath ) )
35
- handleScroll ( this . router , route , this . current , false )
36
+ handleScroll ( this . router , route , fromRoute , false )
36
37
onComplete && onComplete ( route )
37
38
} , onAbort )
38
39
}
39
40
40
41
replace ( location : RawLocation , onComplete ? : Function , onAbort ? : Function ) {
42
+ const { current : fromRoute } = this
41
43
this . transitionTo ( location , route => {
42
44
replaceState ( cleanPath ( this . base + route . fullPath ) )
43
- handleScroll ( this . router , route , this . current , false )
45
+ handleScroll ( this . router , route , fromRoute , false )
44
46
onComplete && onComplete ( route )
45
47
} , onAbort )
46
48
}
You can’t perform that action at this time.
0 commit comments