mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
28 lines
1.0 KiB
JavaScript
28 lines
1.0 KiB
JavaScript
/** 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
|