Some checks failed
CI / go (push) Waiting to run
CI / docker (push) Waiting to run
CI / lint-go (push) Waiting to run
CI / lint-docs (push) Waiting to run
CI / check-paperclip (push) Waiting to run
Deploy static site / Deploy to GitHub Pages (push) Has been cancelled
Deploy static site / Deploy via Docker to hatch.surf (push) Has been cancelled
Resolved conflicts by taking GitHub versions for: - .dockerignore, .gitignore, Dockerfile, README.md, docker-compose.yml Kept deploy.sh updated to: - Pull from GitHub (primary source) - Push to Gitea (push-mirror) - Build from site/ directory (GitHub structure) Co-Authored-By: Paperclip <noreply@paperclip.ing>
15 lines
797 B
JavaScript
15 lines
797 B
JavaScript
// This has to be a shared module which is shared between client component error boundary and dynamic component
|
|
const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING';
|
|
/** An error that should be thrown when we want to bail out to client-side rendering. */ export class BailoutToCSRError extends Error {
|
|
constructor(reason){
|
|
super(`Bail out to client-side rendering: ${reason}`), this.reason = reason, this.digest = BAILOUT_TO_CSR;
|
|
}
|
|
}
|
|
/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */ export function isBailoutToCSRError(err) {
|
|
if (typeof err !== 'object' || err === null || !('digest' in err)) {
|
|
return false;
|
|
}
|
|
return err.digest === BAILOUT_TO_CSR;
|
|
}
|
|
|
|
//# sourceMappingURL=bailout-to-csr.js.map
|