File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
packages/react-refresh/src Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,17 @@ export function injectIntoGlobalHook(globalObject: any): void {
465465 } ;
466466 }
467467
468+ if ( hook . isDisabled ) {
469+ // This isn't a real property on the hook, but it can be set to opt out
470+ // of DevTools integration and associated warnings and logs.
471+ // Using console['warn'] to evade Babel and ESLint
472+ console [ 'warn' ] (
473+ 'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' +
474+ 'Fast Refresh is not compatible with this shim and will be disabled.' ,
475+ ) ;
476+ return ;
477+ }
478+
468479 // Here, we just want to get a reference to scheduleRefresh.
469480 const oldInject = hook.inject;
470481 hook.inject = function(injected) {
You can’t perform that action at this time.
0 commit comments