Skip to content

Commit

Permalink
fix: Sentry errors (#2185)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlimvReal authored Jan 22, 2024
1 parent 5ed1de9 commit 8ede717
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/app/core/session/auth/keycloak/keycloak-auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,9 @@ export class KeycloakAuthService {
});
}

getUserinfo(): Promise<KeycloakUser> {
return this.keycloak
.getKeycloakInstance()
.loadUserInfo() as Promise<KeycloakUser>;
async getUserinfo(): Promise<KeycloakUser> {
const user = await this.keycloak.getKeycloakInstance().loadUserInfo();
return user as KeycloakUser;
}

setEmail(email: string): Observable<any> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class TodosDashboardComponent extends DashboardWidget {
filterEntries = (todo: Todo) => {
return (
!todo.completed &&
todo.assignedTo.includes(this.currentUser.value.getId()) &&
todo.assignedTo.includes(this.currentUser.value?.getId()) &&
moment(todo.startDate).isSameOrBefore(moment(), "days")
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (appLang === DEFAULT_LANGUAGE) {
function bootstrap(): Promise<any> {
// Dynamically load the main module after the language has been initialized
return AppSettings.initRuntimeSettings()
.catch((err) => logger.error(err))
.catch((err) => logger.debug(err))
.then(() => import("./app/app.module"))
.then((m) => platformBrowserDynamic().bootstrapModule(m.AppModule))
.catch((err) => logger.error(err));
Expand Down

0 comments on commit 8ede717

Please sign in to comment.