Skip to content
Permalink
Browse files
Handle issue with two concurrent JSONP requests that use the same cal…
…lback name.
  • Loading branch information
Pinhook authored and jeresig committed Oct 13, 2010
1 parent 8fb4d9a commit 39addc87a37b32be19f2c58ec8babe752c0243e1
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/ajax.js
@@ -239,10 +239,6 @@ jQuery.extend({
var customJsonp = window[ jsonp ];

window[ jsonp ] = function( tmp ) {
data = tmp;
jQuery.handleSuccess( s, xhr, status, data );
jQuery.handleComplete( s, xhr, status, data );

if ( jQuery.isFunction( customJsonp ) ) {
customJsonp( tmp );

@@ -258,6 +254,10 @@ jQuery.extend({
if ( head ) {
head.removeChild( script );
}

data = tmp;
jQuery.ajax.handleSuccess( s, xhr, status, data );
jQuery.ajax.handleComplete( s, xhr, status, data );
};
}

2 comments on commit 39addc8

@kswedberg
Copy link
Member

@kswedberg kswedberg commented on 39addc8 Oct 14, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit is killing the test suite at test 242. I'm pretty sure jQuery.ajax.handleSuccess and jQuery.ajax.handleComplete should still be jQuery.handleSuccess and jQuery.handleComplete for the time being.

@jeresig
Copy link
Member

@jeresig jeresig commented on 39addc8 Oct 14, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch Karl - fixed: d490bcf

Please sign in to comment.