If the XHR object no longer exists assume that the request was aborted.
[jquery.git] / src / ajax.js
index c6b8d0f..7760593 100644 (file)
@@ -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 );