mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
prevent js crash if responseJSON is undefined
This commit is contained in:
@@ -49,7 +49,7 @@ define('uploader', ['csrf'], function(csrf) {
|
|||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
xhr = maybeParse(xhr);
|
xhr = maybeParse(xhr);
|
||||||
showAlert('error', xhr.responseJSON.error);
|
showAlert('error', xhr.responseJSON ? xhr.responseJSON.error : 'error uploading, code : ' + xhr.status);
|
||||||
},
|
},
|
||||||
|
|
||||||
uploadProgress: function(event, position, total, percent) {
|
uploadProgress: function(event, position, total, percent) {
|
||||||
|
|||||||
Reference in New Issue
Block a user