diff --git a/src/history/html5.js b/src/history/html5.js
index 17e1c5cbe..95c47344c 100644
--- a/src/history/html5.js
+++ b/src/history/html5.js
@@ -5,15 +5,16 @@ import { History } from './base'
import { cleanPath } from '../util/path'
import { START } from '../util/route'
import { setupScroll, handleScroll } from '../util/scroll'
-import { pushState, replaceState } from '../util/push-state'
+import { pushState, replaceState, supportsPushState } from '../util/push-state'
export class HTML5History extends History {
constructor (router: Router, base: ?string) {
super(router, base)
const expectScroll = router.options.scrollBehavior
+ const supportsScroll = supportsPushState && expectScroll
- if (expectScroll) {
+ if (supportsScroll) {
setupScroll()
}
@@ -29,7 +30,7 @@ export class HTML5History extends History {
}
this.transitionTo(location, route => {
- if (expectScroll) {
+ if (supportsScroll) {
handleScroll(router, route, current, true)
}
})