Skip to content

Commit ce59ba7

Browse files
committed
chore: update beforeResolve guard at nav. api router
1 parent 9367a97 commit ce59ba7

File tree

1 file changed

+3
-1
lines changed
  • packages/router/src/navigation-api

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@ export function createNavigationApiRouter(
871871
window.matchMedia('(prefers-reduced-motion: reduce)').matches) ||
872872
!isChangingPage(to, from)
873873
) {
874+
next(true)
874875
return
875876
}
876877

@@ -887,7 +888,8 @@ export function createNavigationApiRouter(
887888
.catch(() => options.onAborted?.(transition))
888889
.finally(resetTransitionState)
889890

890-
return promise
891+
// promise will be resolved
892+
next(true)
891893
}
892894
)
893895

0 commit comments

Comments
 (0)