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.
This commit is contained in:
parent
5b92a5f5ec
commit
139135a98a
2 changed files with 28 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue