From 201e528eb51e0d0d11c3cdb38196a05786d1433d Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Mon, 8 Jun 2015 17:43:00 -0700 Subject: [PATCH] On AJAX error, decrement active requests in global ajax queue so errors that occur during UI tests do not timeout. --- plugins/Morpheus/javascripts/ajaxHelper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/Morpheus/javascripts/ajaxHelper.js b/plugins/Morpheus/javascripts/ajaxHelper.js index d2ac8568e7..bfe916578e 100644 --- a/plugins/Morpheus/javascripts/ajaxHelper.js +++ b/plugins/Morpheus/javascripts/ajaxHelper.js @@ -359,7 +359,11 @@ function ajaxHelper() { async: this.async !== false, url: url, dataType: this.format || 'json', - error: this.errorCallback, + error: function () { + --globalAjaxQueue.active; + + that.errorCallback.apply(this, arguments); + }, success: function (response) { if (that.loadingElement) { $(that.loadingElement).hide(); -- GitLab