Restore DevTools console message (#21864)
This commit is contained in:
parent
a4ecd85e86
commit
9f5224a9c6
|
@ -69,8 +69,13 @@ export function injectInternals(internals: Object): boolean {
|
||||||
console.error('React instrumentation encountered an error: %s.', err);
|
console.error('React instrumentation encountered an error: %s.', err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// DevTools exists
|
if (hook.checkDCE) {
|
||||||
return true;
|
// This is the real DevTools.
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// This is likely a hook installed by Fast Refresh runtime.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {
|
export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {
|
||||||
|
|
|
@ -69,8 +69,13 @@ export function injectInternals(internals: Object): boolean {
|
||||||
console.error('React instrumentation encountered an error: %s.', err);
|
console.error('React instrumentation encountered an error: %s.', err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// DevTools exists
|
if (hook.checkDCE) {
|
||||||
return true;
|
// This is the real DevTools.
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
// This is likely a hook installed by Fast Refresh runtime.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {
|
export function onScheduleRoot(root: FiberRoot, children: ReactNodeList) {
|
||||||
|
|
Loading…
Reference in New Issue