From ff0b29c87cc5eef7bd3d4181f398c462c5314c41 Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 19 Jul 2021 08:04:39 +0100 Subject: [PATCH] Fix undefined exit code --- webui/js/ActionButton.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webui/js/ActionButton.js b/webui/js/ActionButton.js index 6a3de19..b94002e 100644 --- a/webui/js/ActionButton.js +++ b/webui/js/ActionButton.js @@ -44,10 +44,10 @@ class ActionButton extends window.HTMLButtonElement { ).then((json) => { marshalLogsJsonToHtml({"logs": [json.logEntry]}) - if (json.timedOut) { + if (json.logEntry.timedOut) { this.onActionResult('actionTimeout', 'Timed out') - } else if (json.exitCode !== 0) { - this.onActionResult('actionNonZeroExit', 'Exit code ' + json.exitCode) + } else if (json.logEntry.exitCode !== 0) { + this.onActionResult('actionNonZeroExit', 'Exit code ' + json.logEntry.exitCode) } else { this.onActionResult('actionSuccess', 'Success!') }