aboutsummaryrefslogtreecommitdiffstats
path: root/src/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ajax.js')
-rw-r--r--src/ajax.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ajax.js b/src/ajax.js
index a6dc4095a..55b528eac 100644
--- a/src/ajax.js
+++ b/src/ajax.js
@@ -746,8 +746,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() {};
}