aboutsummaryrefslogtreecommitdiffstats
path: root/src/deferred.js
diff options
context:
space:
mode:
authorjaubourg <j@ubourg.net>2011-07-01 01:51:50 +0200
committerjaubourg <j@ubourg.net>2011-07-01 01:51:50 +0200
commit139135a98aab1c422e5ae05b026535a40d58328f (patch)
tree39def1374dc0bb2836658e2de7911229f4738ed4 /src/deferred.js
parent5b92a5f5eccf69d480c11dbd2870f8161ae0441b (diff)
downloadjquery-139135a98aab1c422e5ae05b026535a40d58328f.tar.gz
jquery-139135a98aab1c422e5ae05b026535a40d58328f.zip
Fixes #9446. Context is properly propagated using pipe. If context was the original deferred, then context is updated to next deferred in the chain. Unit tests added.
Diffstat (limited to 'src/deferred.js')
-rw-r--r--src/deferred.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/deferred.js b/src/deferred.js
index 5cc5fb5be..e543f1518 100644
--- a/src/deferred.js
+++ b/src/deferred.js
@@ -122,7 +122,7 @@ jQuery.extend({
if ( returned && jQuery.isFunction( returned.promise ) ) {
returned.promise().then( newDefer.resolve, newDefer.reject );
} else {
- newDefer[ action ]( returned );
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
}
});
} else {