File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 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'
55import { cleanPath } from '../util/path'
66import { START } from '../util/route'
77import { setupScroll , handleScroll } from '../util/scroll'
8- import { pushState , replaceState } from '../util/push-state'
8+ import { pushState , replaceState , supportsPushState } from '../util/push-state'
99
1010export class HTML5History extends History {
1111 constructor ( router : Router , base : ?string ) {
1212 super ( router , base )
1313
1414 const expectScroll = router . options . scrollBehavior
15+ const supportsScroll = supportsPushState && expectScroll
1516
16- if ( expectScroll ) {
17+ if ( supportsScroll ) {
1718 setupScroll ( )
1819 }
1920
@@ -29,7 +30,7 @@ export class HTML5History extends History {
2930 }
3031
3132 this . transitionTo ( location , route => {
32- if ( expectScroll ) {
33+ if ( supportsScroll ) {
3334 handleScroll ( router , route , current , true )
3435 }
3536 } )
You can’t perform that action at this time.
0 commit comments