Skip to content

Commit 439b641

Browse files
staltzbenlesh
authored andcommitted
fix(bufferToggle): fix unsubscriptions of closing Observable
Fix bufferToggle to unsubscribe from the closing Observables once the bufferToggle Observable is unsubscribed.
1 parent 83349df commit 439b641

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/operator/bufferToggle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ class BufferToggleSubscriber<T, O> extends Subscriber<T> {
9292
contexts.push(context);
9393
const subscriber = new BufferToggleClosingsSubscriber(this, context);
9494
const subscription = closingNotifier._subscribe(subscriber);
95-
this.add(context.subscription.add(subscription));
95+
context.subscription.add(subscription);
96+
this.add(subscription);
9697
}
9798
}
9899

0 commit comments

Comments
 (0)