Permalink
Browse files

Ajax: remove use of jQuery#each second argument

  • Loading branch information...
markelog committed Feb 17, 2015
1 parent 8356281 commit a4715f4216ace92fba6991106053415e66289686
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/ajax/load.js
View
@@ -70,7 +70,9 @@ jQuery.fn.load = function( url, params, callback ) {
// but they are ignored because response was set above.
// If it fails, this function gets "jqXHR", "status", "error"
}).always( callback && function( jqXHR, status ) {
self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
self.each( function() {
callback.apply( self, response || [ jqXHR.responseText, status, jqXHR ] );
});
});
}

1 comment on commit a4715f4

@blq

This comment has been minimized.

Show comment
Hide comment
@blq

blq Apr 4, 2016

Hi, I think this commit introduced a bug!
"this" for the callback will now be the jQuery instance, not the DOM element.
I reported it here: #3035

blq commented on a4715f4 Apr 4, 2016

Hi, I think this commit introduced a bug!
"this" for the callback will now be the jQuery instance, not the DOM element.
I reported it here: #3035

Please sign in to comment.