This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/_esm5/internal/observable/onErrorResumeNext.js

28 lines
1 KiB
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
/** PURE_IMPORTS_START _Observable,_from,_util_isArray,_empty PURE_IMPORTS_END */
import { Observable } from '../Observable';
import { from } from './from';
import { isArray } from '../util/isArray';
import { EMPTY } from './empty';
export function onErrorResumeNext() {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
if (sources.length === 0) {
return EMPTY;
}
var first = sources[0], remainder = sources.slice(1);
if (sources.length === 1 && isArray(first)) {
return onErrorResumeNext.apply(void 0, first);
}
return new Observable(function (subscriber) {
var subNext = function () { return subscriber.add(onErrorResumeNext.apply(void 0, remainder).subscribe(subscriber)); };
return from(first).subscribe({
next: function (value) { subscriber.next(value); },
error: subNext,
complete: subNext,
});
});
}
//# sourceMappingURL=onErrorResumeNext.js.map