aboutsummaryrefslogtreecommitdiffstats
path: root/src/deferred.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-03-30 18:54:32 +0200
committerjaubourg <j@ubourg.net>2011-03-30 18:54:32 +0200
commitf2ce87df8ef933dc3372b7d7ab8ea6e54dcd66b6 (patch)
tree0e858015e09e6c484b3864f006a859ee9d5a3b75 /src/deferred.js
parent2555a5a2322f78fc1cfc8a0f2b55580fc79d2f32 (diff)
downloadjquery-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.js5
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 ) );
}
};
}