Commit 53aa2e0c authored by Timmy Willison's avatar Timmy Willison

Use charAt instead of string indexing for oldIE's sake. Fixes #14356.

parent c6b4230d
......@@ -78,7 +78,7 @@ function addToPrefiltersOrTransports( structure ) {
// For each dataType in the dataTypeExpression
while ( (dataType = dataTypes[i++]) ) {
// Prepend if requested
if ( dataType[0] === "+" ) {
if ( dataType.charAt( 0 ) === "+" ) {
dataType = dataType.slice( 1 ) || "*";
(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
......
......@@ -1568,9 +1568,10 @@ module( "ajax", {
//----------- jQuery.ajaxPrefilter()
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, {
dataType: "prefix",
setup: function() {
// Ensure prefix does not throw an error
jQuery.ajaxPrefilter("+prefix *", function( options, _, jqXHR ) {
jQuery.ajaxPrefilter("+prefix", function( options, _, jqXHR ) {
if ( options.abortInPrefilter ) {
jqXHR.abort();
}
......
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