Skip to content
Permalink
Browse files

ajaxStop was getting called too many times, separated some of the log…

…ic into the abort method itself.
  • Loading branch information
jeresig committed Jan 12, 2010
1 parent c320e4f commit d60b19781095f508e32a590c7ee112817b0794ee
Showing with 7 additions and 4 deletions.
  1. +7 −4 src/ajax.js
@@ -455,13 +455,16 @@ jQuery.extend({
var oldAbort = xhr.abort;
xhr.abort = function() {
oldAbort.call( xhr );
if ( xhr ) {
xhr.readyState = 0;
}

if ( !requestDone ) {
complete();
}
onreadystatechange();

if ( xhr ) {
xhr.onreadystatechange = null;
}

requestDone = true;
};
} catch(e) { }

0 comments on commit d60b197

Please sign in to comment.
You can’t perform that action at this time.