Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/src/components/AppErrorBoundary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ class ErrorBoundary extends React.Component {
}

componentDidCatch(error, errorInfo) {
if (error?.message?.includes('Loading chunk')) return window.location.reload()
console.error('Error caught by ErrorBoundary: ', error, errorInfo)
this.setState({ error, errorInfo })
}

render() {
if (this.state.hasError) {
if (this.state.hasError && !this.state.error?.message?.includes('Loading chunk')) {
return (
<CContainer className="border-2 border border-danger m-5 rounded-3">
<h1 className="mt-4">Something went wrong.</h1>
Expand Down