UI: Fixed auth service function updatedAuthUserFromToken when authUser and tokenData in null
This commit is contained in:
parent
f830dd0ae2
commit
f3edcc489d
@ -502,7 +502,7 @@ export class AuthService {
|
||||
private updatedAuthUserFromToken(token: string) {
|
||||
const authUser = getCurrentAuthUser(this.store);
|
||||
const tokenData = this.jwtHelper.decodeToken(token);
|
||||
if (['sub', 'firstName', 'lastName'].some(value => authUser[value] !== tokenData[value])) {
|
||||
if (authUser && tokenData && ['sub', 'firstName', 'lastName'].some(value => authUser[value] !== tokenData[value])) {
|
||||
this.store.dispatch(new ActionAuthUpdateAuthUser({
|
||||
sub: tokenData.sub,
|
||||
firstName: tokenData.firstName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user