Skip to content

Commit

Permalink
add aditional if to stop error message in console from popping up if …
Browse files Browse the repository at this point in the history
…result is undefined
  • Loading branch information
Vakmeth committed Dec 4, 2023
1 parent 243bd3e commit 123c360
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions frontend/src/app/team/team.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
});
}
Expand Down

0 comments on commit 123c360

Please sign in to comment.