From: Robert Kaiser Date: Mon, 20 Nov 2017 18:57:06 +0000 (+0100) Subject: make sure we don't get an error if there's no response X-Git-Tag: production~21 X-Git-Url: https://git-public.kairo.at/?a=commitdiff_plain;h=b5291db1cf7dff0d45dc632de2b7b4d377b5db97;p=lantea.git make sure we don't get an error if there's no response --- 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"] + ")";