Skip to content

Commit

Permalink
Make sure that async transport is still used even though we don't nee…
Browse files Browse the repository at this point in the history
…d the callback results.
  • Loading branch information
jeresig committed Dec 17, 2009
1 parent dd3128c commit 0ba7433
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,9 @@ jQuery.extend({

for ( var i = 0; i < length; i++ ) {
// We only need to run the callback after all the scripts have loaded
jQuery.require( arguments[i], i === length - 1 ? callback : null );
jQuery.require( arguments[i], i === length - 1 ? callback :
// Make sure that a blank callback is provided to ensure async transport
typeof callback === "function" ? function(){} : null );
}

return;
Expand Down

0 comments on commit 0ba7433

Please sign in to comment.