From bbbc2510f54500ec114f7ff3474add7790dbe0b4 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Fri, 16 Nov 2018 04:37:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20index=20calculation=20in?= =?UTF-8?q?=20task=20manager?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ssn/installation/taskManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;