Skip to content

Commit 7b6a0f7

Browse files
committed
fix onError undefined
1 parent bfab063 commit 7b6a0f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/error-boundary/internal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class ErrorBoundaryImpl extends Component<ErrorBoundaryImplProps, ErrorBoundaryS
112112
}
113113

114114
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {
115-
this.props.onError({ error, errorInfo, errorBoundaryId: this.props.errorBoundaryId });
115+
this.props.onError?.({ error, errorInfo, errorBoundaryId: this.props.errorBoundaryId });
116116
}
117117

118118
render() {

0 commit comments

Comments
 (0)