From d308821c4c92bbd1393c874ee0f493eb72487df7 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sat, 19 Nov 2016 22:17:28 +0100 Subject: [PATCH] Fix possible server errors that cannot be parsed by jQuery --- src/static/pretixpresale/js/ui/asynctask.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/static/pretixpresale/js/ui/asynctask.js b/src/static/pretixpresale/js/ui/asynctask.js index a90ce6aee6..71686c710e 100644 --- a/src/static/pretixpresale/js/ui/asynctask.js +++ b/src/static/pretixpresale/js/ui/asynctask.js @@ -64,8 +64,8 @@ function async_task_callback(data, jqXHR, status) { function async_task_error(jqXHR, textStatus, errorThrown) { "use strict"; $("body").data('ajaxing', false); - var c = $(jqXHR.responseText).filter('.container'); - if (c.length > 0) { + if (jqXHR.responseText.indexOf('container') > 0) { + var c = $(jqXHR.responseText).filter('.container'); waitingDialog.hide(); ajaxErrDialog.show(c.first().html()); } else {