diff options
author | jaubourg <j@ubourg.net> | 2011-03-30 18:54:32 +0200 |
---|---|---|
committer | jaubourg <j@ubourg.net> | 2011-03-30 18:54:32 +0200 |
commit | f2ce87df8ef933dc3372b7d7ab8ea6e54dcd66b6 (patch) | |
tree | 0e858015e09e6c484b3864f006a859ee9d5a3b75 /src/deferred.js | |
parent | 2555a5a2322f78fc1cfc8a0f2b55580fc79d2f32 (diff) | |
download | jquery-f2ce87df8ef933dc3372b7d7ab8ea6e54dcd66b6.tar.gz jquery-f2ce87df8ef933dc3372b7d7ab8ea6e54dcd66b6.zip |
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.
Diffstat (limited to 'src/deferred.js')
-rw-r--r-- | src/deferred.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/deferred.js b/src/deferred.js index f0d7c08c5..90f9c8089 100644 --- a/src/deferred.js +++ b/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 ) ); } }; } |