Commit 39addc87 authored by Pinhook's avatar Pinhook Committed by jeresig

Handle issue with two concurrent JSONP requests that use the same callback name.

parent 8fb4d9af
...@@ -239,10 +239,6 @@ jQuery.extend({ ...@@ -239,10 +239,6 @@ jQuery.extend({
var customJsonp = window[ jsonp ]; var customJsonp = window[ jsonp ];
window[ jsonp ] = function( tmp ) { window[ jsonp ] = function( tmp ) {
data = tmp;
jQuery.handleSuccess( s, xhr, status, data );
jQuery.handleComplete( s, xhr, status, data );
if ( jQuery.isFunction( customJsonp ) ) { if ( jQuery.isFunction( customJsonp ) ) {
customJsonp( tmp ); customJsonp( tmp );
...@@ -258,6 +254,10 @@ jQuery.extend({ ...@@ -258,6 +254,10 @@ jQuery.extend({
if ( head ) { if ( head ) {
head.removeChild( script ); head.removeChild( script );
} }
data = tmp;
jQuery.ajax.handleSuccess( s, xhr, status, data );
jQuery.ajax.handleComplete( s, xhr, status, data );
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment