Skip to content

Commit

Permalink
refactor(remote-context): Clean up context cleanup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Sep 26, 2024
1 parent 7ffc764 commit 9ee9a31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/remote-context/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export abstract class AlwatrRemoteContextStateMachineBase<T extends Json = Json>
}

this.context_ = this.jsonResponse_;
this.cleanup_();
}

protected override requestFailed_(error: Error): void {
Expand All @@ -108,8 +107,8 @@ export abstract class AlwatrRemoteContextStateMachineBase<T extends Json = Json>
}
}

protected cleanup_(): void {
delete this.rawResponse_;
delete this.jsonResponse_;
protected override clean_(): void {
super.clean_();
delete this.context_;
}
}

0 comments on commit 9ee9a31

Please sign in to comment.