mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Ensures dataTypeExpressions are lowercased for prefilters and transports registrations.
This commit is contained in:
parent
945ac0d0b1
commit
91ca71daaa
@ -48,7 +48,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( jQuery.isFunction( func ) ) {
|
if ( jQuery.isFunction( func ) ) {
|
||||||
var dataTypes = dataTypeExpression.split( rspacesAjax ),
|
var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
|
||||||
i = 0,
|
i = 0,
|
||||||
length = dataTypes.length,
|
length = dataTypes.length,
|
||||||
dataType,
|
dataType,
|
||||||
@ -62,7 +62,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|||||||
// any existing element
|
// any existing element
|
||||||
placeBefore = /^\+/.test( dataType );
|
placeBefore = /^\+/.test( dataType );
|
||||||
if ( placeBefore ) {
|
if ( placeBefore ) {
|
||||||
dataType = dataType.substr( 1 );
|
dataType = dataType.substr( 1 ) || "*";
|
||||||
}
|
}
|
||||||
list = structure[ dataType ] = structure[ dataType ] || [];
|
list = structure[ dataType ] = structure[ dataType ] || [];
|
||||||
// then we add to the structure accordingly
|
// then we add to the structure accordingly
|
||||||
|
Loading…
Reference in New Issue
Block a user