Просмотр исходного кода

Fix #1536: parse Json response to String in _parseError function (#1567)

Jérémy Munsch 5 лет назад
Родитель
Сommit
45706311c7
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      js/fileinput.js

+ 1 - 1
js/fileinput.js

@@ -2257,7 +2257,7 @@
             /** @namespace jqXHR.responseJSON */
             /** @namespace jqXHR.responseJSON */
             var self = this, errMsg = $.trim(errorThrown + ''), textPre,
             var self = this, errMsg = $.trim(errorThrown + ''), textPre,
                 text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?
                 text = jqXHR.responseJSON !== undefined && jqXHR.responseJSON.error !== undefined ?
-                    jqXHR.responseJSON.error : jqXHR.responseText;
+                    jqXHR.responseJSON.error.toString() : jqXHR.responseText;
             if (self.cancelling && self.msgUploadAborted) {
             if (self.cancelling && self.msgUploadAborted) {
                 errMsg = self.msgUploadAborted;
                 errMsg = self.msgUploadAborted;
             }
             }