File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
packages/react-refresh/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -464,13 +464,18 @@ export function injectIntoGlobalHook(globalObject: any): void {
464464 onCommitFiberUnmount( ) { } ,
465465 } ;
466466 }
467- // Checks if DevTools hook is disabled
467+
468468 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
469472 console [ 'warn' ] (
470473 'Something has shimmed the React DevTools global hook (REACT_DEVTOOLS_GLOBAL_HOOK). ' +
471474 'Fast Refresh is not compatible with this shim and will be disabled.' ,
472475 ) ;
476+ return ;
473477 }
478+
474479 // Here, we just want to get a reference to scheduleRefresh.
475480 const oldInject = hook.inject;
476481 hook.inject = function(injected) {
You can’t perform that action at this time.
0 commit comments