Skip to content
Snippets Groups Projects
Unverified Commit 118bf803 authored by Jesse Devaney's avatar Jesse Devaney Committed by GitHub
Browse files

add optional message to error boundaries (#30620)

parent ad8126e6
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ export default class ErrorBoundary extends React.Component<
{
onError?: (errorInfo: ErrorInfo) => void;
errorComponent?: ComponentType;
message?: string;
},
{
hasError: boolean;
......@@ -38,7 +39,7 @@ export default class ErrorBoundary extends React.Component<
const ErrorComponent = this.props.errorComponent
? this.props.errorComponent
: SmallGenericError;
return <ErrorComponent />;
return <ErrorComponent message={this.props.message} />;
}
return this.props.children;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment