Fix for bug #12874. Tested succesfully with r.js version 2.0.2 #1028

Closed
wants to merge 1 commit into from
View
5 src/callbacks.js
@@ -90,7 +90,7 @@ jQuery.Callbacks = function( options ) {
if ( list ) {
// First, we save the current length
var start = list.length;
- (function add( args ) {
+ function add( args ) {
@rwaldron
jQuery Foundation member

This actually changes the semantics of the code; we can't accept this without a test that supports the change.

@timmywil
jQuery Foundation member

I think he's saying the bug only happens when compiled with r.js. A qunit test may not be possible. However, if existing tests still pass, that may be all that is needed to support the change.

@rwaldron
jQuery Foundation member

If that's the case, it sounds like a bug in r.js...

@rwldrn How does this change the semantics of the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
jQuery.each( args, function( _, arg ) {
var type = jQuery.type( arg );
if ( type === "function" ) {
@@ -102,7 +102,8 @@ jQuery.Callbacks = function( options ) {
add( arg );
}
});
- })( arguments );
+ }
+ add( arguments );
// Do we need to add the callbacks to the
// current firing batch?
if ( firing ) {