File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,16 @@ import { History } from './base'
5
5
import { cleanPath } from '../util/path'
6
6
import { START } from '../util/route'
7
7
import { setupScroll , handleScroll } from '../util/scroll'
8
- import { pushState , replaceState } from '../util/push-state'
8
+ import { pushState , replaceState , supportsPushState } from '../util/push-state'
9
9
10
10
export class HTML5History extends History {
11
11
constructor ( router : Router , base : ?string ) {
12
12
super ( router , base )
13
13
14
14
const expectScroll = router . options . scrollBehavior
15
+ const supportsScroll = supportsPushState && expectScroll
15
16
16
- if ( expectScroll ) {
17
+ if ( supportsScroll ) {
17
18
setupScroll ( )
18
19
}
19
20
@@ -29,7 +30,7 @@ export class HTML5History extends History {
29
30
}
30
31
31
32
this . transitionTo ( location , route => {
32
- if ( expectScroll ) {
33
+ if ( supportsScroll ) {
33
34
handleScroll ( router , route , current , true )
34
35
}
35
36
} )
You can’t perform that action at this time.
0 commit comments