In a batched task, keep all error messages.

If there are other batches in the task sent,
it should not remove previous errors.
This commit is contained in:
Marc-Andre Ferland 2022-10-11 21:53:08 -04:00
parent a1b2f0ccf1
commit b673e216b6

View File

@ -231,14 +231,16 @@ function setStatus(statusType, msg, msgType) {
}
function logMsg(msg, level, outputMsg) {
if (level === 'error') {
outputMsg.innerHTML = '<span style="color: red">Error: ' + msg + '</span>'
} else if (level === 'warn') {
outputMsg.innerHTML = '<span style="color: orange">Warning: ' + msg + '</span>'
} else {
outputMsg.innerText = msg
if (outputMsg.hasChildNodes()) {
outputMsg.appendChild(document.createElement('br'))
}
if (level === 'error') {
outputMsg.innerHTML += '<span style="color: red">Error: ' + msg + '</span>'
} else if (level === 'warn') {
outputMsg.innerHTML += '<span style="color: orange">Warning: ' + msg + '</span>'
} else {
outputMsg.innerText += msg
}
console.log(level, msg)
}