diff --git a/flow/declarations.js b/flow/declarations.js index e62aeb9f9..003f5846d 100644 --- a/flow/declarations.js +++ b/flow/declarations.js @@ -30,6 +30,7 @@ declare type AfterNavigationHook = (to: Route, from: Route) => any declare type RouterOptions = { routes?: Array<RouteConfig>; mode?: string; + fallback?: boolean; base?: string; linkActiveClass?: string; parseQuery?: (query: string) => Object; diff --git a/src/index.js b/src/index.js index e50c0ea0a..a1a7b8507 100644 --- a/src/index.js +++ b/src/index.js @@ -42,7 +42,7 @@ export default class VueRouter { this.matcher = createMatcher(options.routes || [], this) let mode = options.mode || 'hash' - this.fallback = mode === 'history' && !supportsPushState + this.fallback = mode === 'history' && !supportsPushState && options.fallback !== false if (this.fallback) { mode = 'hash' }