diff --git a/src/operators/skipUntil.ts b/src/operators/skipUntil.ts index d7f9ac1268..ad283f7894 100644 --- a/src/operators/skipUntil.ts +++ b/src/operators/skipUntil.ts @@ -2,8 +2,8 @@ import Operator from '../Operator'; import Subscriber from '../Subscriber'; import Observable from '../Observable'; -export default function skipUntil(total) { - return this.lift(new SkipUntilOperator(total)); +export default function skipUntil(notifier: Observable): Observable { + return this.lift(new SkipUntilOperator(notifier)); } class SkipUntilOperator implements Operator { @@ -18,8 +18,9 @@ class SkipUntilOperator implements Operator { class SkipUntilSubscriber extends Subscriber { private notificationSubscriber: NotificationSubscriber = null; - constructor(destination: Subscriber, private notifier: Observable) { - super(destination); + constructor(public destination: Subscriber, + private notifier: Observable) { + super(null); this.notificationSubscriber = new NotificationSubscriber(this); this.add(this.notifier.subscribe(this.notificationSubscriber)); } @@ -30,6 +31,10 @@ class SkipUntilSubscriber extends Subscriber { } } + _error(err: any) { + this.destination.error(err); + } + _complete() { if (this.notificationSubscriber.hasCompleted) { this.destination.complete();