🐛 Only add response text if there is one
This commit is contained in:
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,
|
||||
|
||||
Reference in new issue
Block a user