Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Correct name of global hook variable.
  • Loading branch information
bvaughn authored Nov 11, 2020
commit 8527d9d135ace0a5de6c169ce91008ae7d1803d1
2 changes: 1 addition & 1 deletion packages/react-refresh/src/ReactFreshRuntime.js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ export function injectIntoGlobalHook(globalObject: any): void {
// of DevTools integration and associated warnings and logs.
// Using console['warn'] to evade Babel and ESLint
console['warn'](
'Something has shimmed the React DevTools global hook (REACT_DEVTOOLS_GLOBAL_HOOK). ' +
'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' +
'Fast Refresh is not compatible with this shim and will be disabled.',
);
Comment thread
AceTheCreator marked this conversation as resolved.
return;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the console warning wasn't actually disabling Fast Refresh. Needed to add return to prevent the rest of the function from overriding hook methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bvaughn thanks. Skipped my mind.

Expand Down