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 8ad22a2b152f55b12385b126305383e2c5ba1994
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/ajax/jsonp.js
@@ -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.
You can’t perform that action at this time.