mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Use charAt instead of string indexing for oldIE's sake. Fixes #14356.
This commit is contained in:
parent
c6b4230d5c
commit
53aa2e0c8b
@ -78,7 +78,7 @@ function addToPrefiltersOrTransports( structure ) {
|
|||||||
// For each dataType in the dataTypeExpression
|
// For each dataType in the dataTypeExpression
|
||||||
while ( (dataType = dataTypes[i++]) ) {
|
while ( (dataType = dataTypes[i++]) ) {
|
||||||
// Prepend if requested
|
// Prepend if requested
|
||||||
if ( dataType[0] === "+" ) {
|
if ( dataType.charAt( 0 ) === "+" ) {
|
||||||
dataType = dataType.slice( 1 ) || "*";
|
dataType = dataType.slice( 1 ) || "*";
|
||||||
(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
|
(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
|
||||||
|
|
||||||
|
@ -1568,9 +1568,10 @@ module( "ajax", {
|
|||||||
//----------- jQuery.ajaxPrefilter()
|
//----------- jQuery.ajaxPrefilter()
|
||||||
|
|
||||||
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, {
|
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, {
|
||||||
|
dataType: "prefix",
|
||||||
setup: function() {
|
setup: function() {
|
||||||
// Ensure prefix does not throw an error
|
// Ensure prefix does not throw an error
|
||||||
jQuery.ajaxPrefilter("+prefix *", function( options, _, jqXHR ) {
|
jQuery.ajaxPrefilter("+prefix", function( options, _, jqXHR ) {
|
||||||
if ( options.abortInPrefilter ) {
|
if ( options.abortInPrefilter ) {
|
||||||
jqXHR.abort();
|
jqXHR.abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user