Skip to content

Commit

Permalink
fix(subscribe): ignore syncError when deprecated
Browse files Browse the repository at this point in the history
Unless using the deprecated syncError handling, the syncErrorThrowable
flag should be ignored.
  • Loading branch information
cartant committed May 26, 2018
1 parent 445dfe4 commit 44e1a27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/internal/Observable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ export class Observable<T> implements Subscribable<T> {
if (operator) {
operator.call(sink, this.source);
} else {
sink.add(this.source || !sink.syncErrorThrowable ? this._subscribe(sink) : this._trySubscribe(sink));
sink.add(
this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
this._subscribe(sink) :
this._trySubscribe(sink)
);
}

if (config.useDeprecatedSynchronousErrorHandling) {
Expand Down

0 comments on commit 44e1a27

Please sign in to comment.