From f497dc317080997cbc129ce46cec19184ffd3558 Mon Sep 17 00:00:00 2001 From: j433866 Date: Tue, 11 Jun 2019 10:01:40 +0100 Subject: [PATCH] Handle progressMessage in background waiter. Don't update tab progress if there's no set recipe --- src/web/waiters/BackgroundWorkerWaiter.mjs | 1 + src/web/waiters/OutputWaiter.mjs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/web/waiters/BackgroundWorkerWaiter.mjs b/src/web/waiters/BackgroundWorkerWaiter.mjs index ed9f8c29..a7f9b83a 100644 --- a/src/web/waiters/BackgroundWorkerWaiter.mjs +++ b/src/web/waiters/BackgroundWorkerWaiter.mjs @@ -68,6 +68,7 @@ class BackgroundWorkerWaiter { break; case "optionUpdate": case "statusMessage": + case "progressMessage": // Ignore these messages break; default: diff --git a/src/web/waiters/OutputWaiter.mjs b/src/web/waiters/OutputWaiter.mjs index 5e5ebeba..39b41cf1 100755 --- a/src/web/waiters/OutputWaiter.mjs +++ b/src/web/waiters/OutputWaiter.mjs @@ -975,7 +975,9 @@ class OutputWaiter { } tabStr = tabStr.slice(0, 200); this.manager.tabs.updateOutputTabHeader(inputNum, tabStr); - this.manager.tabs.updateOutputTabProgress(inputNum, this.outputs[inputNum].progress, this.manager.worker.recipeConfig.length); + if (this.manager.worker.recipeConfig !== undefined) { + this.manager.tabs.updateOutputTabProgress(inputNum, this.outputs[inputNum].progress, this.manager.worker.recipeConfig.length); + } const tabItem = this.manager.tabs.getOutputTabItem(inputNum); if (tabItem) {