make sure we don't get an error if there's no response
authorRobert Kaiser <kairo@kairo.at>
Mon, 20 Nov 2017 18:57:06 +0000 (19:57 +0100)
committerRobert Kaiser <kairo@kairo.at>
Mon, 20 Nov 2017 18:57:06 +0000 (19:57 +0100)
js/ui.js

index 60abf40..6375101 100644 (file)
--- 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"] + ")";