From: John Resig Date: Wed, 26 Aug 2009 17:39:52 +0000 (+0000) Subject: If the XHR object no longer exists assume that the request was aborted. X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=f52c4a3d5fb69f143d90f9a032e2a004c36ccae3;p=jquery.git If the XHR object no longer exists assume that the request was aborted. --- diff --git a/src/ajax.js b/src/ajax.js index c6b8d0f..7760593 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -370,7 +370,7 @@ jQuery.extend({ // Wait for a response to come back var onreadystatechange = function(isTimeout){ // The request was aborted, clear the interval and decrement jQuery.active - if ( xhr.readyState === 0 ) { + if ( !xhr || xhr.readyState === 0 ) { if ( ival ) { // clear poll interval clearInterval( ival );