Make sure that the xhr object still exists after the abort is called.
[jquery.git] / src / ajax.js
index 02322ab..8aa6a9a 100644 (file)
@@ -457,7 +457,9 @@ jQuery.extend({
                        xhr.abort = function() {
                                if ( xhr ) {
                                        oldAbort.call( xhr );
-                                       xhr.readyState = 0;
+                                       if ( xhr ) {
+                                               xhr.readyState = 0;
+                                       }
                                }
 
                                onreadystatechange();