Skip to content

Commit 1a46add

Browse files
committed
fixup! feat(react): add a handled prop to ErrorBoundary
1 parent 098c151 commit 1a46add

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/src/errorboundary.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundarySta
113113
beforeCapture(scope, error, passedInComponentStack);
114114
}
115115

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

119119
if (onError) {
120120
onError(error, passedInComponentStack, eventId);

0 commit comments

Comments
 (0)