Skip to content
Snippets Groups Projects
Commit a697beae authored by Tom Käsler's avatar Tom Käsler
Browse files

Fix async handling

The dialog should only be closed after the event got emitted.
parent cccc818d
No related merge requests found
...@@ -51,8 +51,8 @@ export class RoomEditComponent implements OnInit { ...@@ -51,8 +51,8 @@ export class RoomEditComponent implements OnInit {
this.roomService.deleteRoom(room.id).subscribe(result => { this.roomService.deleteRoom(room.id).subscribe(result => {
const event = new RoomDeleted(room.id); const event = new RoomDeleted(room.id);
this.eventService.broadcast(event.type, event.payload); this.eventService.broadcast(event.type, event.payload);
this.dialogRef.close('delete');
this.router.navigate([`/creator`]);
}); });
this.dialogRef.close('delete');
this.router.navigate([`/creator`]);
} }
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment