Skip to content

Commit

Permalink
Ajax: Remove unnecessary use of jQuery.trim
Browse files Browse the repository at this point in the history
The subsequent .match already ignores leading/trailing space.

Ref gh-3003
Closes gh-3095
  • Loading branch information
ralinc authored and gibson042 committed Apr 29, 2016
1 parent d3a781d commit 0bd98b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ jQuery.extend( {
s.type = options.method || options.type || s.method || s.type;

// Extract dataTypes list
s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];

// A cross-domain request is in order when the origin doesn't match the current origin.
if ( s.crossDomain == null ) {
Expand Down

0 comments on commit 0bd98b1

Please sign in to comment.