Fix Bug 2121: NG-UI uses unmaintained Chokidar version
- Upgraded Angular from 11 to 14 version to remove chokidar
unmaintained version.
- Changed linting tool tslint to eslint for angular 14 as tslint
is depreacted after angular 12
- Resolved linting issues from code
Change-Id: I00e908ab651db0f080e0d18a9d1c9711f4e36b91
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/services/AuthenticationService.ts b/src/services/AuthenticationService.ts
index 0399c59..5eda6f9 100644
--- a/src/services/AuthenticationService.ts
+++ b/src/services/AuthenticationService.ts
@@ -18,6 +18,7 @@
/**
* @file Auth service
*/
+import { isNullOrUndefined } from 'util';
import { HttpHeaders } from '@angular/common/http';
import { Injectable, Injector } from '@angular/core';
import { Router } from '@angular/router';
@@ -27,7 +28,6 @@
import { environment } from 'environment';
import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
-import { isNullOrUndefined } from 'util';
import { ProjectModel } from '../models/VNFDModel';
import { RestService } from './RestService';
@@ -196,7 +196,9 @@
localStorage.setItem('token_state', null);
localStorage.setItem('osmVersion', osmVersion);
this.idle.stop();
- this.router.navigate(['login']).catch();
+ this.router.navigate(['login']).catch((): void => {
+ // Catch Navigation Error
+ });
}
/**
* Logout the user & clearing the token.
@@ -225,7 +227,9 @@
if (window.location.pathname === '/changepassword' && localStorage.getItem('username') !== null) {
window.history.back();
} else if (window.location.pathname === '/' && localStorage.getItem('firstLogin') === 'true') {
- this.router.navigate(['/login']).catch();
+ this.router.navigate(['/login']).catch((): void => {
+ // Catch Navigation Error
+ });
}
}
}