Skip to content

Commit 6022972

Browse files
fix: solid scroll restoration
1 parent 38410d7 commit 6022972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/solid-router/src/Transitioner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export function Transitioner() {
3131
const previousIsPagePending = usePrevious(isPagePending)
3232

3333
if (!router.isServer) {
34-
router.startTransition = (fn: () => void) => {
34+
router.startTransition = async (fn: () => void | Promise<void>) => {
3535
setIsTransitioning(true)
36-
fn()
36+
await fn()
3737
setIsTransitioning(false)
3838
}
3939
}

0 commit comments

Comments
 (0)