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/_esm2015/internal/observable/onErrorResumeNext.js
2019-08-11 20:48:02 +02:00

22 lines
No EOL
763 B
JavaScript

import { Observable } from '../Observable';
import { from } from './from';
import { isArray } from '../util/isArray';
import { EMPTY } from './empty';
export function onErrorResumeNext(...sources) {
if (sources.length === 0) {
return EMPTY;
}
const [first, ...remainder] = sources;
if (sources.length === 1 && isArray(first)) {
return onErrorResumeNext(...first);
}
return new Observable(subscriber => {
const subNext = () => subscriber.add(onErrorResumeNext(...remainder).subscribe(subscriber));
return from(first).subscribe({
next(value) { subscriber.next(value); },
error: subNext,
complete: subNext,
});
});
}
//# sourceMappingURL=onErrorResumeNext.js.map