We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62f9354 commit ac3a5fdCopy full SHA for ac3a5fd
1 file changed
src/store/store.ts
@@ -47,7 +47,7 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
47
*/
48
pollRun(runId: number, repoContext: GitHubRepoContext, intervalMs: number, attempts = 10) {
49
const existingUpdater: Updater | undefined = this.updaters.get(runId);
50
- if (existingUpdater) {
+ if (existingUpdater && existingUpdater.handle) {
51
clearInterval(existingUpdater.handle);
52
}
53
@@ -69,7 +69,10 @@ export class RunStore extends EventEmitter<RunStoreEvent> {
69
70
updater.remainingAttempts--;
71
if (updater.remainingAttempts === 0) {
72
- clearInterval(updater.handle);
+ if (updater.handle) {
73
+ clearInterval(updater.handle);
74
+ }
75
+
76
this.updaters.delete(updater.runId);
77
78
0 commit comments