diff --git a/src/ssn/installation/taskManager.ts b/src/ssn/installation/taskManager.ts index deae0b7..ed916c0 100644 --- a/src/ssn/installation/taskManager.ts +++ b/src/ssn/installation/taskManager.ts @@ -13,8 +13,8 @@ export default function taskManager(tasks: Array<() => Promise>, maxConcur } } else { //If there is at least one task left, complete it - const curTask = remainingTasks.shift() as () => Promise; const curTaskIndex = origLength - remainingTasks.length; + const curTask = remainingTasks.shift() as () => Promise; currentlyRunningTasks += 1; curTask().then(function(...result) { returnValues[curTaskIndex] = result;