mirror of
https://github.com/jquery/jquery.git
synced 2026-02-10 04:05:20 -05:00
Makes sure statusCode callbacks are ordered in the same way success and error callbacks are. Unit tests added.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user