aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-01-20 15:39:30 +0100
committerjaubourg <j@ubourg.net>2011-01-20 15:39:30 +0100
commit9ab00a712fe3757f130dce8b42293c82a68c690e (patch)
tree64e97ba21c369d34b954a92ae81ea091631bda74 /src
parent64e1cdbb95b8bbefbc9dec70ae30e0714a549619 (diff)
downloadjquery-9ab00a712fe3757f130dce8b42293c82a68c690e.tar.gz
jquery-9ab00a712fe3757f130dce8b42293c82a68c690e.zip
Makes sure statusCode callbacks are ordered in the same way success and error callbacks are. Unit tests added.
Diffstat (limited to 'src')
-rw-r--r--src/ajax.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ajax.js b/src/ajax.js
index fc1ecfde3..63914d23a 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -427,10 +427,8 @@ jQuery.extend({
// 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 ) {
@@ -588,6 +586,8 @@ jQuery.extend({
}
// Status-dependent callbacks
+ oldStatusCode = statusCode;
+ statusCode = undefined;
jXHR.statusCode( oldStatusCode );
if ( s.global ) {