git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makes sure statusCode callbacks are ordered in the same way success and error callbac...
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
fc1ecfd
..
63914d2
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-427,10
+427,8
@@
jQuery.extend({
// Stored error
error,
// Stored error
error,
- // Keep track of statusCode callbacks
- oldStatusCode = statusCode;
-
- statusCode = undefined;
+ // To keep track of statusCode based callbacks
+ oldStatusCode;
// If successful, handle type chaining
if ( status >= 200 && status < 300 || status === 304 ) {
// If successful, handle type chaining
if ( status >= 200 && status < 300 || status === 304 ) {
@@
-588,6
+586,8
@@
jQuery.extend({
}
// Status-dependent callbacks
}
// Status-dependent callbacks
+ oldStatusCode = statusCode;
+ statusCode = undefined;
jXHR.statusCode( oldStatusCode );
if ( s.global ) {
jXHR.statusCode( oldStatusCode );
if ( s.global ) {