Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
No EOL
964 B
Text
27 lines
No EOL
964 B
Text
import { innerFrom } from '../observable/innerFrom';
|
|
import { createOperatorSubscriber } from './OperatorSubscriber';
|
|
import { operate } from '../util/lift';
|
|
export function catchError(selector) {
|
|
return operate((source, subscriber) => {
|
|
let innerSub = null;
|
|
let syncUnsub = false;
|
|
let handledResult;
|
|
innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {
|
|
handledResult = innerFrom(selector(err, catchError(selector)(source)));
|
|
if (innerSub) {
|
|
innerSub.unsubscribe();
|
|
innerSub = null;
|
|
handledResult.subscribe(subscriber);
|
|
}
|
|
else {
|
|
syncUnsub = true;
|
|
}
|
|
}));
|
|
if (syncUnsub) {
|
|
innerSub.unsubscribe();
|
|
innerSub = null;
|
|
handledResult.subscribe(subscriber);
|
|
}
|
|
});
|
|
}
|
|
//# sourceMappingURL=catchError.js.map |