Skip to content

Commit

Permalink
fix(forkJoin): catch and forward selector errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Jan 26, 2018
1 parent ea10cd4 commit c96f4d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/internal/observable/ForkJoinObservable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@ class ForkJoinSubscriber<T> extends OuterSubscriber<T, T> {
}

if (haveValues === len) {
const value = resultSelector ? resultSelector.apply(this, values) : values;
let value: any;
try {
value = resultSelector ? resultSelector.apply(this, values) : values;
} catch (err) {
destination.error(err);
return;
}
destination.next(value);
}

Expand Down

0 comments on commit c96f4d2

Please sign in to comment.