Commit 8f8961de authored by jaubourg's avatar jaubourg

Reformats logic for early abort in beforeSend to limit block imbrication.

parent 03bad0a9
......@@ -667,11 +667,10 @@ jQuery.extend({
// Allow custom headers/mimetypes and early abort
if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
// Abort if not done already
done( 0, "abort" );
// Return false
jqXHR = false;
jqXHR.abort();
return false;
} else {
}
// Install callbacks on deferreds
for ( i in { success: 1, error: 1, complete: 1 } ) {
......@@ -710,7 +709,7 @@ jQuery.extend({
}
}
}
}
return jqXHR;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment