From c98930b06f10d00e77e16b56afa1658f6740a224 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Thu, 24 Feb 2022 15:43:04 -0600 Subject: Make the program not output an error when there isn't one Signed-off-by: Matt Strapp --- src/public/js/form.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/public/js') diff --git a/src/public/js/form.js b/src/public/js/form.js index 724fb05..9e926fa 100644 --- a/src/public/js/form.js +++ b/src/public/js/form.js @@ -57,11 +57,12 @@ function actuate(file) { if (xhr.status === 200 || xhr.status === 500) { createDownload(response.file); } - // Display upload error message to the user - document.getElementById('actuate-err').innerText = response.error; - // DEBUG: Print full error if unknown error occurs - if (xhr.status === 500) + if (xhr.status === 500) { + document.getElementById('actuate-err').innerText = response.error; + // DEBUG: Print full error if unknown error occurs console.error(response.error_msg); + } + } return; }; -- cgit v1.2.3