Skip to content
Permalink
Browse files
Prevents tests for replaceInData to take place if replaceInUrl is alr…
…eady true.
  • Loading branch information
jaubourg committed Apr 22, 2012
1 parent 8e7aaa7 commit 8ad22a2
Showing 1 changed file with 1 addition and 1 deletion.
@@ -23,7 +23,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
url = s.url,
hasCallback = s.jsonp !== false,
replaceInUrl = hasCallback && rjsonp.test( url ),
replaceInData = hasCallback && typeof data === "string" &&
replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
!( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
rjsonp.test( data );

0 comments on commit 8ad22a2

Please sign in to comment.