Fix 694d846b64 - JSON parse error on upload progress

Ref: 694d846b64
Ref: d344a8f7ae

You can see the JSON parse error in the console when you have the upload progress extension

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2023-01-22 00:53:05 +04:00
parent e7612bc49a
commit df143fd879
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -183,7 +183,8 @@ var Console = {
});
$(document).on('ajaxComplete', function (event, xhr, ajaxOptions) {
if (ajaxOptions.dataType && ajaxOptions.dataType.indexOf('json') !== -1) {
// Not a json body, then skip
if (ajaxOptions.dataType && ajaxOptions.dataType.indexOf('json') === -1) {
return;
}
if (xhr.status !== 200) {