Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
adonesky1 committed Dec 6, 2023
1 parent 60f9c75 commit eaec80e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/polling-controller/src/PollingController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ function PollingControllerMixin<TBase extends Constructor>(Base: TBase) {
found = true;
tokenSet.delete(pollingToken);
if (tokenSet.size === 0) {
clearTimeout(this.#intervalIds[key]);
delete this.#intervalIds[key];
if (this.#intervalIds[key]) {
clearTimeout(this.#intervalIds[key]);
delete this.#intervalIds[key];
}

// if applicable stop listening for new blocks
if (this.#getNetworkClientById !== undefined) {
Expand Down

0 comments on commit eaec80e

Please sign in to comment.