Skip to content

Commit

Permalink
ajaxStop was getting called too many times, separated some of the log…
Browse files Browse the repository at this point in the history
…ic into the abort method itself.
  • Loading branch information
jeresig committed Jan 12, 2010
1 parent c320e4f commit d60b197
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) { }

Expand Down

0 comments on commit d60b197

Please sign in to comment.