From: Eduardo San Martin Morote Date: Mon, 28 Feb 2022 13:54:07 +0000 (+0100) Subject: fix(ssr): reject unfinished initial navigation X-Git-Tag: v4.0.13~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=509fc0d5c78b32cbd5ce0c86f716774ad6163cad;p=thirdparty%2Fvuejs%2Frouter.git fix(ssr): reject unfinished initial navigation Fix #1305 --- diff --git a/src/router.ts b/src/router.ts index da3170c5..90ddeef3 100644 --- a/src/router.ts +++ b/src/router.ts @@ -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) )