Skip to content

Commit ac3a5fd

Browse files
committed
Fix build error
1 parent 62f9354 commit ac3a5fd

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/store/store.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
4747
*/
4848
pollRun(runId: number, repoContext: GitHubRepoContext, intervalMs: number, attempts = 10) {
4949
const existingUpdater: Updater | undefined = this.updaters.get(runId);
50-
if (existingUpdater) {
50+
if (existingUpdater && existingUpdater.handle) {
5151
clearInterval(existingUpdater.handle);
5252
}
5353

@@ -69,7 +69,10 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
6969

7070
updater.remainingAttempts--;
7171
if (updater.remainingAttempts === 0) {
72-
clearInterval(updater.handle);
72+
if (updater.handle) {
73+
clearInterval(updater.handle);
74+
}
75+
7376
this.updaters.delete(updater.runId);
7477
}
7578

0 commit comments

Comments
 (0)