X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Fservices%2FAuthGuardService.ts;h=512705fa2dde000386a8f47117c0c9ceb86a61f6;hb=0a34dfa32165036b380ec6ac493469b34007df0a;hp=2effecaea321bc0e160053672230c5bbcfb84495;hpb=40cc37ef2bbc4aac5debc9dea0baeb6dbd87a2d7;p=osm%2FNG-UI.git diff --git a/src/services/AuthGuardService.ts b/src/services/AuthGuardService.ts index 2effeca..512705f 100644 --- a/src/services/AuthGuardService.ts +++ b/src/services/AuthGuardService.ts @@ -45,6 +45,7 @@ export class AuthGuardService implements CanActivate { * Returns Observable if authorized @public */ public canActivate(next: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { + // eslint-disable-next-line deprecation/deprecation return combineLatest( this.authService.isLoggedIn, this.authService.isChangePassword @@ -53,7 +54,9 @@ export class AuthGuardService implements CanActivate { if (changePassword || isLoggedIn) { return true; } else { - this.router.navigate(['/login']).catch(); + this.router.navigate(['/login']).catch((): void => { + // Catch Navigation Error + }); this.authService.destoryToken(); return false; }