Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
fix(missionruntime): unset missionruntime state on destroy (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikram-raj authored and edewit committed Oct 25, 2018
1 parent 122bdd1 commit a7f498b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class MissionRuntimeStepComponent extends LauncherStep implements OnInit,
this.subscriptions.forEach((sub) => {
sub.unsubscribe();
});
this.projectile.unSetState(this.id);
}

initBoosters(): void {
Expand Down
4 changes: 4 additions & 0 deletions projects/ngx-launcher/src/lib/model/projectile.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export class Projectile<T> {
this._state[stepId] = state;
}

unSetState(stepId: string) {
delete this._state[stepId];
}

getState(stepId: string): StepState<T> {
return this._state[stepId];
}
Expand Down

0 comments on commit a7f498b

Please sign in to comment.