wilddragon-site/node_modules/next/dist/esm/client/components/handle-isr-error.js
2026-04-17 15:51:01 -04:00

17 lines
No EOL
637 B
JavaScript
Executable file

const workAsyncStorage = typeof window === 'undefined' ? require('../../server/app-render/work-async-storage.external').workAsyncStorage : undefined;
// if we are revalidating we want to re-throw the error so the
// function crashes so we can maintain our previous cache
// instead of caching the error page
export function handleISRError({ error }) {
if (workAsyncStorage) {
const store = workAsyncStorage.getStore();
if (store?.isStaticGeneration) {
if (error) {
console.error(error);
}
throw error;
}
}
}
//# sourceMappingURL=handle-isr-error.js.map