Skip to content

Commit

Permalink
fix: white screen when authentication fails
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasPabloFerreira committed Oct 17, 2024
1 parent 03dcbe6 commit 5f20f74
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/services/authentication/authentication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class AuthenticationService {
constructor(private httpClient: HttpClient) {
this.currentUserSubject = new BehaviorSubject<User>(JSON.parse(localStorage.getItem('currentUser')));
this.currentUser = this.currentUserSubject.asObservable();
this.viewConfiguration = new BehaviorSubject<any>(JSON.parse(localStorage.getItem('currentUser'))?.[0]?.viewConfiguration);
const currentUser = JSON.parse(localStorage.getItem('currentUser'));
this.viewConfiguration = new BehaviorSubject<any>(currentUser ? currentUser[0].viewConfiguration : null);
this.viewConfigurationObservable = this.viewConfiguration.asObservable();
}

Expand Down

0 comments on commit 5f20f74

Please sign in to comment.