🚑 Fix index calculation in task manager
This commit is contained in:
parent
0789fa0451
commit
bbbc2510f5
1 changed files with 1 additions and 1 deletions
|
@ -13,8 +13,8 @@ export default function taskManager(tasks: Array<() => Promise<void>>, maxConcur
|
|||
}
|
||||
} else {
|
||||
//If there is at least one task left, complete it
|
||||
const curTask = remainingTasks.shift() as () => Promise<void>;
|
||||
const curTaskIndex = origLength - remainingTasks.length;
|
||||
const curTask = remainingTasks.shift() as () => Promise<void>;
|
||||
currentlyRunningTasks += 1;
|
||||
curTask().then(function(...result) {
|
||||
returnValues[curTaskIndex] = result;
|
||||
|
|
Loading…
Reference in a new issue