Skip to content

Commit

Permalink
fix(exhaustMap): remove innersubscription when it completes
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Feb 27, 2016
1 parent 9767158 commit 7ca0859
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/operator/exhaustMap.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Operator} from '../Operator';
import {Observable, ObservableInput} from '../Observable';
import {Subscriber} from '../Subscriber';
import {Subscription} from '../Subscription';
import {OuterSubscriber} from '../OuterSubscriber';
import {InnerSubscriber} from '../InnerSubscriber';
import {subscribeToResult} from '../util/subscribeToResult';
Expand Down Expand Up @@ -95,7 +96,9 @@ class SwitchFirstMapSubscriber<T, I, R> extends OuterSubscriber<T, I> {
this.destination.error(err);
}

notifyComplete(): void {
notifyComplete(innerSub: Subscription): void {
this.remove(innerSub);

this.hasSubscription = false;
if (this.hasCompleted) {
this.destination.complete();
Expand Down

0 comments on commit 7ca0859

Please sign in to comment.