From b5291db1cf7dff0d45dc632de2b7b4d377b5db97 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Mon, 20 Nov 2017 19:57:06 +0100 Subject: [PATCH] make sure we don't get an error if there's no response --- js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui.js b/js/ui.js index 60abf40..6375101 100644 --- a/js/ui.js +++ b/js/ui.js @@ -528,7 +528,7 @@ function reportUploadStatus(aSuccess, aResponse) { if (aSuccess) { document.getElementById("uploadSuccess").style.display = "block"; } - else if (aResponse["message"]) { + else if (aResponse && aResponse["message"]) { document.getElementById("uploadErrorMsg").textContent = aResponse["message"]; if (aResponse["errortype"]) { document.getElementById("uploadErrorMsg").textContent += " (" + aResponse["errortype"] + ")"; -- 2.43.0