From 321c233b231a2cd51a226df2a482cd611ce5289e Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Mon, 24 Jun 2024 08:52:55 +0200 Subject: [PATCH] fix: clear queue clean up --- src/lib/queue.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/queue.ts b/src/lib/queue.ts index e7521a4..4356a47 100644 --- a/src/lib/queue.ts +++ b/src/lib/queue.ts @@ -45,6 +45,8 @@ export class Queue { q.reject(new Error(`Aborted, due to reason: "${reason}"`)) } + // Clear the queue, but leave any isRunning functions in place: + this.queue = this.queue.filter((q) => q.isRunning) } private checkQueue() {