diff --git a/frontend/src/app/team/team.component.ts b/frontend/src/app/team/team.component.ts index 5a36d2418a..289a6a6013 100644 --- a/frontend/src/app/team/team.component.ts +++ b/frontend/src/app/team/team.component.ts @@ -130,10 +130,12 @@ export class TeamComponent { }, }); dialog.afterClosed().subscribe((result) => { - if (result.state == CloseState.DELETED) { - this.removeTeam(result.id).then(() => this.refreshDataService.markDataRefresh()); - } else { - this.refreshDataService.markDataRefresh(); + if (result) { + if (result.state == CloseState.DELETED) { + this.removeTeam(result.id).then(() => this.refreshDataService.markDataRefresh()); + } else { + this.refreshDataService.markDataRefresh(); + } } }); }