diff --git a/src/app/core/shared/operators.ts b/src/app/core/shared/operators.ts index ecc1f53933..29e41907e1 100644 --- a/src/app/core/shared/operators.ts +++ b/src/app/core/shared/operators.ts @@ -181,9 +181,9 @@ export const redirectOn404Or401 = (router: Router) => tap((rd: RemoteData) => { if (rd.hasFailed) { if (rd.error.statusCode === 404) { - router.navigateByUrl(`/${getPageNotFoundRoute()}`, {skipLocationChange: true}); + router.navigateByUrl(getPageNotFoundRoute(), {skipLocationChange: true}); } else if (rd.error.statusCode === 401) { - router.navigateByUrl(`/${getUnauthorizedRoute()}`, {skipLocationChange: true}); + router.navigateByUrl(getUnauthorizedRoute(), {skipLocationChange: true}); } } }));