From 83fabb007afbccf6129b93e18ebf420e2b1b10d1 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 19 Dec 2019 19:01:22 +0100 Subject: [PATCH] fixed issue with refresh page when user is already authenticated --- src/app/core/auth/auth.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 94b1e9e6ff..a536313521 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -60,7 +60,8 @@ export class AuthService { // and is not the login route, clear redirect url and messages const routeUrl$ = this.store.pipe( select(routerStateSelector), - filter((routerState: RouterReducerState) => isNotUndefined(routerState) && isNotUndefined(routerState.state)), + filter((routerState: RouterReducerState) => isNotUndefined(routerState) + && isNotUndefined(routerState.state) && isNotEmpty(routerState.state.url)), filter((routerState: RouterReducerState) => !this.isLoginRoute(routerState.state.url)), map((routerState: RouterReducerState) => routerState.state.url) );