Skip to content
Permalink
Browse files

Fixes #8692. Strange FF4 bug: values changed onto the arguments objec…

…t sometimes end up as undefined values outside the $.when method. Cloning the object into a fresh array solves the issue.
  • Loading branch information
jaubourg committed Mar 30, 2011
1 parent 2555a5a commit f2ce87df8ef933dc3372b7d7ab8ea6e54dcd66b6
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/deferred.js
@@ -144,7 +144,10 @@ jQuery.extend({
return function( value ) {
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
if ( !( --count ) ) {
deferred.resolveWith( deferred, args );
// Strange bug in FF4:
// Values changed onto the arguments object sometimes end up as undefined values
// outside the $.when method. Cloning the object into a fresh array solves the issue
deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
}
};
}

0 comments on commit f2ce87d

Please sign in to comment.
You can’t perform that action at this time.