summaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/jquery/src/ajax.js
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2022-04-20 00:12:09 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2022-04-20 00:12:09 -0400
commit942e313727d1ad886a1024c24fe4a9e8e2e0bb3e (patch)
tree1c4d5d826655cdb812c88563a25410f8b54e41d2 /npm_assets/node_modules/jquery/src/ajax.js
parent8eeed31eb2f86ac982fa4b26f93b15828289c56d (diff)
New upstream version 8.2.0.upstream/8.2.0
Diffstat (limited to 'npm_assets/node_modules/jquery/src/ajax.js')
-rw-r--r--npm_assets/node_modules/jquery/src/ajax.js13
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() {};
}