File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -333,7 +333,6 @@ export function createRouter(options: RouterOptions): Router {
333
333
const matcher = createRouterMatcher ( options . routes , options )
334
334
let parseQuery = options . parseQuery || originalParseQuery
335
335
let stringifyQuery = options . stringifyQuery || originalStringifyQuery
336
- let { scrollBehavior } = options
337
336
let routerHistory = options . history
338
337
339
338
const beforeGuards = useCallbacks < NavigationGuardWithThis < undefined > > ( )
@@ -345,7 +344,7 @@ export function createRouter(options: RouterOptions): Router {
345
344
let pendingLocation : RouteLocation = START_LOCATION_NORMALIZED
346
345
347
346
// leave the scrollRestoration if no scrollBehavior is provided
348
- if ( isBrowser && scrollBehavior && 'scrollRestoration' in history ) {
347
+ if ( isBrowser && options . scrollBehavior && 'scrollRestoration' in history ) {
349
348
history . scrollRestoration = 'manual'
350
349
}
351
350
@@ -1016,6 +1015,7 @@ export function createRouter(options: RouterOptions): Router {
1016
1015
isPush : boolean ,
1017
1016
isFirstNavigation : boolean
1018
1017
) : Promise < any > {
1018
+ const { scrollBehavior } = options
1019
1019
if ( ! isBrowser || ! scrollBehavior ) return Promise . resolve ( )
1020
1020
1021
1021
let scrollPosition : _ScrollPositionNormalized | null =
You can’t perform that action at this time.
0 commit comments