Skip to content

Commit

Permalink
Change DevTools hook warning message (#17478)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Nov 28, 2019
1 parent 3816ae7 commit 969f4b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/react-devtools-shared/src/__tests__/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ env.beforeEach(() => {
// $FlowFixMe
console.error = (...args) => {
const firstArg = args[0];
if (firstArg === 'Warning: React DevTools encountered an error: %s') {
if (
firstArg === 'Warning: React instrumentation encountered an error: %s'
) {
// Rethrow errors from React.
throw args[1];
} else if (
Expand Down
8 changes: 4 additions & 4 deletions packages/react-reconciler/src/ReactFiberDevToolsHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function injectInternals(internals: Object): boolean {
hasLoggedError = true;
warningWithoutStack(
false,
'React DevTools encountered an error: %s',
'React instrumentation encountered an error: %s',
err,
);
}
Expand All @@ -93,7 +93,7 @@ export function injectInternals(internals: Object): boolean {
hasLoggedError = true;
warningWithoutStack(
false,
'React DevTools encountered an error: %s',
'React instrumentation encountered an error: %s',
err,
);
}
Expand All @@ -107,7 +107,7 @@ export function injectInternals(internals: Object): boolean {
hasLoggedError = true;
warningWithoutStack(
false,
'React DevTools encountered an error: %s',
'React instrumentation encountered an error: %s',
err,
);
}
Expand All @@ -118,7 +118,7 @@ export function injectInternals(internals: Object): boolean {
if (__DEV__) {
warningWithoutStack(
false,
'React DevTools encountered an error: %s.',
'React instrumentation encountered an error: %s.',
err,
);
}
Expand Down

0 comments on commit 969f4b5

Please sign in to comment.