diff options
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts')
-rw-r--r-- | tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts index 7c37de54c9..5ff8e2d53d 100644 --- a/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts +++ b/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/onErrorResumeNext.ts @@ -52,10 +52,13 @@ export function onErrorResumeNext<T, R>(array: ObservableInput<any>[]): Operator * ## Example * Subscribe to the next Observable after map fails * ```javascript + * import { of } from 'rxjs'; + * import { onErrorResumeNext, map } from 'rxjs/operators'; + * * of(1, 2, 3, 0).pipe( * map(x => { * if (x === 0) { throw Error(); } - return 10 / x; + * return 10 / x; * }), * onErrorResumeNext(of(1, 2, 3)), * ) @@ -154,7 +157,7 @@ class OnErrorResumeNextSubscriber<T, R> extends OuterSubscriber<T, R> { private subscribeToNextSource(): void { const next = this.nextSources.shift(); - if (next) { + if (!!next) { const innerSubscriber = new InnerSubscriber(this, undefined, undefined); const destination = this.destination as Subscription; destination.add(innerSubscriber); |