wishthis/node_modules/rxjs/dist/esm5/internal/observable/onErrorResumeNext.js

35 lines
1.2 KiB
JavaScript
Raw Normal View History

2023-02-08 12:35:10 +00:00
import { Observable } from '../Observable';
2022-06-08 10:36:39 +00:00
import { argsOrArgArray } from '../util/argsOrArgArray';
2023-02-08 12:35:10 +00:00
import { OperatorSubscriber } from '../operators/OperatorSubscriber';
import { noop } from '../util/noop';
import { innerFrom } from './innerFrom';
2022-06-08 10:36:39 +00:00
export function onErrorResumeNext() {
var sources = [];
for (var _i = 0; _i < arguments.length; _i++) {
sources[_i] = arguments[_i];
}
2023-02-08 12:35:10 +00:00
var nextSources = argsOrArgArray(sources);
return new Observable(function (subscriber) {
var sourceIndex = 0;
var subscribeNext = function () {
if (sourceIndex < nextSources.length) {
var nextSource = void 0;
try {
nextSource = innerFrom(nextSources[sourceIndex++]);
}
catch (err) {
subscribeNext();
return;
}
var innerSubscriber = new OperatorSubscriber(subscriber, undefined, noop, noop);
nextSource.subscribe(innerSubscriber);
innerSubscriber.add(subscribeNext);
}
else {
subscriber.complete();
}
};
subscribeNext();
});
2022-06-08 10:36:39 +00:00
}
//# sourceMappingURL=onErrorResumeNext.js.map