Skip to content

Commit

Permalink
fix(ssr): reject unfinished initial navigation
Browse files Browse the repository at this point in the history
Fix #1305
  • Loading branch information
posva committed Feb 28, 2022
1 parent 01a791e commit 509fc0d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/router.ts
Expand Up @@ -682,7 +682,10 @@ export function createRouter(options: RouterOptions): Router {
return (failure ? Promise.resolve(failure) : navigate(toLocation, from))
.catch((error: NavigationFailure | NavigationRedirectError) =>
isNavigationFailure(error)
? error
? // navigation redirects still mark the router as ready
isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)
? error
: markAsReady(error) // also returns the error
: // reject any unknown error
triggerError(error, toLocation, from)
)
Expand Down

0 comments on commit 509fc0d

Please sign in to comment.