source: trip-planner-front/node_modules/rxjs/_esm5/internal/observable/onErrorResumeNext.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
2import { Observable } from '../Observable';
3import { from } from './from';
4import { isArray } from '../util/isArray';
5import { EMPTY } from './empty';
6export function onErrorResumeNext() {
7 var sources = [];
8 for (var _i = 0; _i < arguments.length; _i++) {
9 sources[_i] = arguments[_i];
10 }
11 if (sources.length === 0) {
12 return EMPTY;
13 }
14 var first = sources[0], remainder = sources.slice(1);
15 if (sources.length === 1 && isArray(first)) {
16 return onErrorResumeNext.apply(void 0, first);
17 }
18 return new Observable(function (subscriber) {
19 var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
20 return from(first).subscribe({
21 next: function (value) { subscriber.next(value); },
22 error: subNext,
23 complete: subNext,
24 });
25 });
26}
27//# sourceMappingURL=onErrorResumeNext.js.map
Note: See TracBrowser for help on using the repository browser.