Skip to content

Commit

Permalink
fix: ensure conveyorBeltSubject completes even when an error happens
Browse files Browse the repository at this point in the history
  • Loading branch information
hwanders committed Apr 27, 2021
1 parent b10d41f commit 2c6bbdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/game/game.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,12 @@ export class GameComponent implements OnInit {
).subscribe(this.exerciseService.assertExerciseOutput());

this.executeCode(toConveyorBelt);
conveyorBeltSubject.complete();
} catch (error) {
this.notifyAboutErrorInCode(error);
}
finally {
conveyorBeltSubject.complete();
}
}

private pushFruitToPipe(fruit: string) {
Expand Down

0 comments on commit 2c6bbdc

Please sign in to comment.