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 60abf40a4b42793f331645f98e9adbc04a6193c0..63751015851684393209f7372f911096ac09003e 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"] + ")";