const matcher = createRouterMatcher(options.routes, options)
let parseQuery = options.parseQuery || originalParseQuery
let stringifyQuery = options.stringifyQuery || originalStringifyQuery
- let { scrollBehavior } = options
let routerHistory = options.history
const beforeGuards = useCallbacks<NavigationGuardWithThis<undefined>>()
let pendingLocation: RouteLocation = START_LOCATION_NORMALIZED
// leave the scrollRestoration if no scrollBehavior is provided
- if (isBrowser && scrollBehavior && 'scrollRestoration' in history) {
+ if (isBrowser && options.scrollBehavior && 'scrollRestoration' in history) {
history.scrollRestoration = 'manual'
}
isPush: boolean,
isFirstNavigation: boolean
): Promise<any> {
+ const { scrollBehavior } = options
if (!isBrowser || !scrollBehavior) return Promise.resolve()
let scrollPosition: _ScrollPositionNormalized | null =