diff options
Diffstat (limited to 'npm_assets/node_modules/jquery/src/ajax.js')
| -rw-r--r-- | npm_assets/node_modules/jquery/src/ajax.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/npm_assets/node_modules/jquery/src/ajax.js b/npm_assets/node_modules/jquery/src/ajax.js index d1bebd5..4be4a9e 100644 --- a/npm_assets/node_modules/jquery/src/ajax.js +++ b/npm_assets/node_modules/jquery/src/ajax.js @@ -50,7 +50,8 @@ var // Anchor tag for parsing the document origin originAnchor = document.createElement( "a" ); - originAnchor.href = location.href; + +originAnchor.href = location.href; // Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport function addToPrefiltersOrTransports( structure ) { @@ -431,8 +432,8 @@ jQuery.extend( { // Context for global events is callbackContext if it is a DOM node or jQuery collection globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, + jQuery( callbackContext ) : + jQuery.event, // Deferreds deferred = jQuery.Deferred(), @@ -744,8 +745,10 @@ jQuery.extend( { response = ajaxHandleResponses( s, jqXHR, responses ); } - // Use a noop converter for missing script - if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { s.converters[ "text script" ] = function() {}; } |
