Fix possible server errors that cannot be parsed by jQuery

This commit is contained in:
Raphael Michel
2016-11-19 22:17:28 +01:00
parent 5ef52598c6
commit d308821c4c

View File

@@ -64,8 +64,8 @@ function async_task_callback(data, jqXHR, status) {
function async_task_error(jqXHR, textStatus, errorThrown) { function async_task_error(jqXHR, textStatus, errorThrown) {
"use strict"; "use strict";
$("body").data('ajaxing', false); $("body").data('ajaxing', false);
var c = $(jqXHR.responseText).filter('.container'); if (jqXHR.responseText.indexOf('container') > 0) {
if (c.length > 0) { var c = $(jqXHR.responseText).filter('.container');
waitingDialog.hide(); waitingDialog.hide();
ajaxErrDialog.show(c.first().html()); ajaxErrDialog.show(c.first().html());
} else { } else {