🐛 Only add response text if there is one

This commit is contained in:
Gina Häußge committed 2019-05-09 15:08:48 +02:00
1 parent f2af5e8b86
commit a35b7cddf2
1 file changed
+3 -1
@@ -1110,7 +1110,9 @@ $(function() {
+ _.sprintf(gettext("Could not upload the file. Make sure that it is a readable, valid file with one of these extensions: %(extensions)s"),
{extensions: extensions})
+ "</p>";
error += pnotifyAdditionalInfo("<pre>" + data.jqXHR.responseText + "</pre>");
if (data.jqXHR.responseText) {
error += pnotifyAdditionalInfo("<pre>" + data.jqXHR.responseText + "</pre>");
}
new PNotify({
title: "Upload failed",
text: error,