From 080464744143d2e4ea6166b36a6125ba3d8610a1 Mon Sep 17 00:00:00 2001 From: j433866 Date: Thu, 4 Apr 2019 13:14:45 +0100 Subject: [PATCH] Load in the right order --- src/web/InputWaiter.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/InputWaiter.mjs b/src/web/InputWaiter.mjs index 3e8ba1f0..bdb6fd77 100644 --- a/src/web/InputWaiter.mjs +++ b/src/web/InputWaiter.mjs @@ -296,7 +296,8 @@ class InputWaiter { if (this.pendingFiles.length > 0) { log.debug("Loading file completed. Loading next file."); - const nextFile = this.pendingFiles.pop(); + const nextFile = this.pendingFiles[0]; + this.pendingFiles.splice(0, 1); currentWorker.inputNum = nextFile.inputNum; currentWorker.worker.postMessage({ file: nextFile.file,