diff --git a/src/Subscriber.ts b/src/Subscriber.ts index 36d8459191..e33424ed3a 100644 --- a/src/Subscriber.ts +++ b/src/Subscriber.ts @@ -39,7 +39,7 @@ export class Subscriber extends Subscription implements Observer { public syncErrorValue: any = null; public syncErrorThrown: boolean = false; - public syncErrorThrowable: boolean = false; + public syncErrorThrowable: boolean = true; protected isStopped: boolean = false; protected destination: PartialObserver; // this `any` is the escape hatch to erase extra type param (e.g. R) @@ -60,10 +60,12 @@ export class Subscriber extends Subscription implements Observer { switch (arguments.length) { case 0: this.destination = emptyObserver; + this.syncErrorThrowable = false; break; case 1: if (!destinationOrNext) { this.destination = emptyObserver; + this.syncErrorThrowable = false; break; } if (typeof destinationOrNext === 'object') { @@ -71,13 +73,11 @@ export class Subscriber extends Subscription implements Observer { this.destination = (> destinationOrNext); ( this.destination).add(this); } else { - this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, > destinationOrNext); } break; } default: - this.syncErrorThrowable = true; this.destination = new SafeSubscriber(this, <((value: T) => void)> destinationOrNext, error, complete); break; }