Skip to content

Commit 497fc98

Browse files
committed
Bringing back the change from 80a4178, adapted to handle both the function collision and the issue mentioned in #7196.
1 parent 091c481 commit 497fc98

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ajax.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,6 @@ jQuery.extend({
239239
var customJsonp = window[ jsonp ];
240240

241241
window[ jsonp ] = function( tmp ) {
242-
data = tmp;
243-
jQuery.handleSuccess( s, xhr, status, data );
244-
jQuery.handleComplete( s, xhr, status, data );
245-
246242
if ( jQuery.isFunction( customJsonp ) ) {
247243
customJsonp( tmp );
248244

@@ -254,6 +250,10 @@ jQuery.extend({
254250
delete window[ jsonp ];
255251
} catch( jsonpError ) {}
256252
}
253+
254+
data = tmp;
255+
jQuery.handleSuccess( s, xhr, status, data );
256+
jQuery.handleComplete( s, xhr, status, data );
257257

258258
if ( head ) {
259259
head.removeChild( script );

0 commit comments

Comments
 (0)