From b673e216b6a1fc15f6deb60f6cad6a12d2b5087c Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Tue, 11 Oct 2022 21:53:08 -0400 Subject: [PATCH] In a batched task, keep all error messages. If there are other batches in the task sent, it should not remove previous errors. --- ui/media/main.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ui/media/main.js b/ui/media/main.js index 0a258b33..8c28998a 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -231,14 +231,16 @@ function setStatus(statusType, msg, msgType) { } function logMsg(msg, level, outputMsg) { - if (level === 'error') { - outputMsg.innerHTML = 'Error: ' + msg + '' - } else if (level === 'warn') { - outputMsg.innerHTML = 'Warning: ' + msg + '' - } else { - outputMsg.innerText = msg + if (outputMsg.hasChildNodes()) { + outputMsg.appendChild(document.createElement('br')) + } + if (level === 'error') { + outputMsg.innerHTML += 'Error: ' + msg + '' + } else if (level === 'warn') { + outputMsg.innerHTML += 'Warning: ' + msg + '' + } else { + outputMsg.innerText += msg } - console.log(level, msg) }