Skip to content

Commit bbd2bbd

Browse files
committed
chore: fix types
1 parent 538ce7b commit bbd2bbd

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/router/src/navigation-api/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,7 @@ export function createNavigationApiRouter(
835835
return
836836
}
837837

838-
const defaultTransitionSetting =
839-
options.transition?.defaultViewTransition ?? true
838+
const defaultTransitionSetting = options.defaultViewTransition ?? true
840839

841840
let finishTransition: (() => void) | undefined
842841
let abortTransition: (() => void) | undefined

packages/router/src/router.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,8 +1407,7 @@ function enableViewTransition(router: Router, options: RouterViewTransition) {
14071407
let finishTransition: (() => void) | undefined
14081408
let abortTransition: (() => void) | undefined
14091409

1410-
const defaultTransitionSetting =
1411-
options.transition?.defaultViewTransition ?? true
1410+
const defaultTransitionSetting = options?.defaultViewTransition ?? true
14121411

14131412
const resetTransitionState = () => {
14141413
transition = undefined
@@ -1468,5 +1467,5 @@ function enableViewTransition(router: Router, options: RouterViewTransition) {
14681467
afterEachTransitionGuard,
14691468
onErrorTransitionGuard,
14701469
popStateListener,
1471-
]
1470+
] as const
14721471
}

0 commit comments

Comments
 (0)