ESLint: fix prefer-const violations

This commit is contained in:
Yury Bondarenko
2023-05-08 16:37:23 +02:00
parent 702246be38
commit 95d3ff6569
27 changed files with 46 additions and 62 deletions

View File

@@ -260,9 +260,8 @@ export class AuthService {
select(getAuthenticationToken),
take(1),
map((authTokenInfo: AuthTokenInfo) => {
let token: AuthTokenInfo;
// Retrieve authentication token info and check if is valid
token = isNotEmpty(authTokenInfo) ? authTokenInfo : this.storage.get(TOKENITEM);
const token = isNotEmpty(authTokenInfo) ? authTokenInfo : this.storage.get(TOKENITEM);
if (isNotEmpty(token) && token.hasOwnProperty('accessToken') && isNotEmpty(token.accessToken) && !this.isTokenExpired(token)) {
return token;
} else {