Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReactDebugTools] wrap uncaught error from rendering user's component #24216

Merged
merged 12 commits into from
Apr 1, 2022
Prev Previous commit
Next Next commit
fix lint
mondaychen committed Mar 30, 2022
commit 82bcb13efefee306ba50b653ce579540c34485f4
2 changes: 1 addition & 1 deletion packages/react-debug-tools/src/ReactDebugHooks.js
Original file line number Diff line number Diff line change
@@ -680,7 +680,7 @@ function handleRenderFunctionError(error: any): void {
const messgae: string =
isError && error.message
? error.message
: 'Error rendering inspected component'
: 'Error rendering inspected component';
// $FlowFixMe: Flow doesn't know about 2nd argument of Error constructor
const wrapperError = new Error(messgae, {cause: error});
// Note: This error name needs to stay in sync with react-devtools-shared