Skip to content

Commit

Permalink
fixup! feat(react): add a handled prop to ErrorBoundary
Browse files Browse the repository at this point in the history
  • Loading branch information
HHK1 committed Jan 10, 2025
1 parent 098c151 commit 1a46add
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react/src/errorboundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundarySta
beforeCapture(scope, error, passedInComponentStack);
}

const isHandled = this.props.handled === undefined ? !!this.props.fallback : this.props.handled;
const eventId = captureReactException(error, errorInfo, { mechanism: { handled: isHandled } });
const handled = this.props.handled != null ? this.props.handled : !!this.props.fallback;
const eventId = captureReactException(error, errorInfo, { mechanism: { handled } });

if (onError) {
onError(error, passedInComponentStack, eventId);
Expand Down

0 comments on commit 1a46add

Please sign in to comment.