Skip to content

Commit f2ce87d

Browse files
committed
Fixes #8692. Strange FF4 bug: 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.
1 parent 2555a5a commit f2ce87d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/deferred.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ jQuery.extend({
144144
return function( value ) {
145145
args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
146146
if ( !( --count ) ) {
147-
deferred.resolveWith( deferred, args );
147+
// Strange bug in FF4:
148+
// Values changed onto the arguments object sometimes end up as undefined values
149+
// outside the $.when method. Cloning the object into a fresh array solves the issue
150+
deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) );
148151
}
149152
};
150153
}

0 commit comments

Comments
 (0)