ajaxStop was getting called too many times, separated some of the logic into the abort method itself.
This commit is contained in:
parent
c320e4f3c2
commit
d60b197810
11
src/ajax.js
11
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) { }
|
||||
|
||||
|
|
Loading…
Reference in a new issue