aboutsummaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js')
-rw-r--r--tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js25
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js b/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js
index 69512a534d..b999780dcf 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/_esm2015/internal/operators/expand.js
@@ -1,5 +1,3 @@
-import { tryCatch } from '../util/tryCatch';
-import { errorObject } from '../util/errorObject';
import { OuterSubscriber } from '../OuterSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';
export function expand(project, concurrent = Number.POSITIVE_INFINITY, scheduler = undefined) {
@@ -42,17 +40,20 @@ export class ExpandSubscriber extends OuterSubscriber {
const index = this.index++;
if (this.active < this.concurrent) {
destination.next(value);
- let result = tryCatch(this.project)(value, index);
- if (result === errorObject) {
- destination.error(errorObject.e);
+ try {
+ const { project } = this;
+ const result = project(value, index);
+ if (!this.scheduler) {
+ this.subscribeToProjection(result, value, index);
+ }
+ else {
+ const state = { subscriber: this, result, value, index };
+ const destination = this.destination;
+ destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
+ }
}
- else if (!this.scheduler) {
- this.subscribeToProjection(result, value, index);
- }
- else {
- const state = { subscriber: this, result, value, index };
- const destination = this.destination;
- destination.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
+ catch (e) {
+ destination.error(e);
}
}
else {