From ffb3055450d95d2461f411e8f46add19e70ef353 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Sun, 29 Nov 2015 17:57:30 +0100 Subject: [PATCH] Prevent the admin to cause an error when an ajax action is in progress and the user navigates to another page --- themes/grav/js/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/grav/js/ajax.js b/themes/grav/js/ajax.js index 8d677391..3dd085a4 100644 --- a/themes/grav/js/ajax.js +++ b/themes/grav/js/ajax.js @@ -102,7 +102,7 @@ $(function(){ }; root.GravAjax.toastErrorHandler = function (xhr, status, error) { - if (status !== 'abort') { + if (status !== 'abort' && !(status == 'error' && error == '')) { toastr.error(error); } };