// If options is not an object,
// we simulate pre-1.5 signature
- if ( typeof( options ) !== "object" ) {
+ if ( typeof options !== "object" ) {
options = url;
url = undefined;
}
statusCode = undefined;
if ( s.global ) {
- globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ) ,
+ globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
[ jXHR, s, isSuccess ? success : error ] );
}
}
} else {
tmp = map[ jXHR.status ];
- jXHR.then( tmp , tmp );
+ jXHR.then( tmp, tmp );
}
}
return this;
selected = list[ i ]( options, originalOptions );
// If we got redirected to a different dataType,
// we add it and switch to the corresponding list
- if ( typeof( selected ) === "string" && selected !== dataType ) {
+ if ( typeof selected === "string" && selected !== dataType ) {
options.dataTypes.unshift( selected );
selected = inspectPrefiltersOrTransports(
structure, options, originalOptions, selected, tested );
return inspectPrefiltersOrTransports( structure, arg1, arg2 );
} else {
// We're requested to add to the structure
- // Signature is ( dataTypeExpression , function )
+ // Signature is ( dataTypeExpression, function )
// with dataTypeExpression being optional and
// defaulting to auto ("*")
type = ( type === "function" );
} else {
// Try convertible dataTypes
for ( type in responses ) {
- if ( ! dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+ if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
finalDataType = type;
break;
}
- if ( ! firstDataType ) {
+ if ( !firstDataType ) {
firstDataType = type;
}
}
});
// Detect, normalize options and install callbacks for jsonp requests
-// (dataIsString is used internally)
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString ) {
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, dataIsString /* internal */ ) {
- dataIsString = ( typeof( s.data ) === "string" );
+ dataIsString = ( typeof s.data === "string" );
if ( s.dataTypes[ 0 ] === "jsonp" ||
originalSettings.jsonpCallback ||