Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 8b331b8

Browse files
committed
Fix Replicator's tasksQueued calculation
1 parent 15ba22b commit 8b331b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Replicator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class Replicator extends EventEmitter {
7070
* @return {[Integer]} [Number of tasks queued]
7171
*/
7272
get tasksQueued () {
73-
return Object.keys(this._queue).length - this.tasksRunning
73+
return Math.max(Object.keys(this._queue).length - this.tasksRunning, 0)
7474
}
7575

7676
/**

0 commit comments

Comments
 (0)