Make sure oldAbort is only called if the xhr object still exists.
authorjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 21:50:59 +0000 (16:50 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 12 Jan 2010 21:50:59 +0000 (16:50 -0500)
src/ajax.js

index 83e5bdc..02322ab 100644 (file)
@@ -455,9 +455,8 @@ jQuery.extend({
                try {
                        var oldAbort = xhr.abort;
                        xhr.abort = function() {
-                               oldAbort.call( xhr );
-
                                if ( xhr ) {
+                                       oldAbort.call( xhr );
                                        xhr.readyState = 0;
                                }