Commit 9aca239 1 parent 12627f9 commit 9aca239 Copy full SHA for 9aca239
File tree 1 file changed +11
-0
lines changed
packages/react-refresh/src
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 {
465
465
} ;
466
466
}
467
467
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
+
468
479
// Here, we just want to get a reference to scheduleRefresh.
469
480
const oldInject = hook.inject;
470
481
hook.inject = function(injected) {
You can’t perform that action at this time.
0 commit comments