From 25b5e727e4647c43c7283c8107e9e8d99790a10b Mon Sep 17 00:00:00 2001 From: rishigupta1599 Date: Tue, 28 Nov 2023 16:25:29 +0530 Subject: [PATCH] Removing unused line --- packages/core/src/queue.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/core/src/queue.js b/packages/core/src/queue.js index e17b407ec..d44894501 100644 --- a/packages/core/src/queue.js +++ b/packages/core/src/queue.js @@ -282,10 +282,6 @@ export class Queue { let queued, pending = this.#pending.size; // calculate the position within queued when not pending if (task && task.pending == null) queued = positionOf(this.#queued, task); - // calculate the position within pending when not stopping - // Commenting below line reason being currently if the task passed is found we will stop flushing - // rest of the tasks but ideally it should wait for flushing of all the tasks till the last dequeued task. - // if (!task?.stop && task?.pending != null) pending = positionOf(this.#pending, task); // call the callback and return true when not queued or pending let position = (queued ?? 0) + pending; callback?.(position);