From 0dab1e20deaf752bd5084ea17440887886018c9d Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Wed, 19 Mar 2014 10:53:21 +0000 Subject: [PATCH] Fix: Only report a general Ajax error when request is complete - Previously if you cancelled an Ajax request, or the browser did (for example following a link) the error handler would be entered and show an alert. This just ensures that the request is complete before showing an error --- .datatables-commit-sync | 2 +- media/js/jquery.dataTables.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index f72caa8b..2598f456 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -a6ba26cc32db737bea178fac2a23d2ea2f7923af +d9f16a4ed28aafc6c68a1fa4174e5e7ebf4d7181 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 0558a543..5adb80c9 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2291,7 +2291,7 @@ if ( error == "parsererror" ) { log( oSettings, 0, 'Invalid JSON response', 1 ); } - else { + else if ( xhr.readyState === 4 ) { log( oSettings, 0, 'Ajax error', 7 ); }