Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
manudeli committed Jan 14, 2025
1 parent 18f5496 commit 87014d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/react/src/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ class BaseErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState
}

componentDidCatch(error: Error, info: ErrorInfo) {
if (error instanceof ErrorInFallback) {
throw error.originalError
}
if (error instanceof SuspensiveError) {
throw error
}
Expand All @@ -136,6 +133,9 @@ class BaseErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState
let childrenOrFallback = children

if (isError) {
if (error instanceof ErrorInFallback) {
throw error.originalError
}
const isCatch = Array.isArray(shouldCatch)
? shouldCatch.some((shouldCatch) => checkErrorBoundary(shouldCatch, error))
: checkErrorBoundary(shouldCatch, error)
Expand Down

0 comments on commit 87014d3

Please sign in to comment.