Skip to content

Commit e1447ac

Browse files
staltzbenlesh
authored andcommitted
fix(catch): fix catch() to preserve Subscriber chain
Fix Catch() operator to include CatchSubscriber in the destination Subscriber, in order not to break unsubscription chains.
1 parent c9c535c commit e1447ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/operator/catch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class CatchSubscriber<T> extends Subscriber<T> {
3939
private caught: Observable<any>) {
4040
super(null);
4141
this.lastSubscription = this;
42+
this.destination.add(this);
4243
}
4344

4445
_next(value: T) {

0 commit comments

Comments
 (0)