@@ -22,7 +22,7 @@ import {
2222 ANSI_STYLE_DIMMING_TEMPLATE ,
2323 ANSI_STYLE_DIMMING_TEMPLATE_WITH_COMPONENT_STACK ,
2424} from 'react-devtools-shared/src/constants' ;
25- import { castBool , castBrowserTheme } from '../utils' ;
25+ import { castBool } from '../utils' ;
2626
2727const OVERRIDE_CONSOLE_METHODS = [ 'error' , 'trace' , 'warn' ] ;
2828
@@ -124,7 +124,6 @@ const consoleSettingsRef: ConsolePatchSettings = {
124124 breakOnConsoleErrors : false ,
125125 showInlineWarningsAndErrors : false ,
126126 hideConsoleLogsInStrictMode : false ,
127- browserTheme : 'dark' ,
128127} ;
129128
130129// Patches console methods to append component stack for the current fiber.
@@ -134,15 +133,13 @@ export function patch({
134133 breakOnConsoleErrors,
135134 showInlineWarningsAndErrors,
136135 hideConsoleLogsInStrictMode,
137- browserTheme,
138136} : $ReadOnly < ConsolePatchSettings > ): void {
139137 // Settings may change after we've patched the console.
140138 // Using a shared ref allows the patch function to read the latest values.
141139 consoleSettingsRef . appendComponentStack = appendComponentStack ;
142140 consoleSettingsRef . breakOnConsoleErrors = breakOnConsoleErrors ;
143141 consoleSettingsRef . showInlineWarningsAndErrors = showInlineWarningsAndErrors ;
144142 consoleSettingsRef . hideConsoleLogsInStrictMode = hideConsoleLogsInStrictMode ;
145- consoleSettingsRef . browserTheme = browserTheme ;
146143
147144 if (
148145 appendComponentStack ||
@@ -402,15 +399,12 @@ export function patchConsoleUsingWindowValues() {
402399 const hideConsoleLogsInStrictMode =
403400 castBool ( window . __REACT_DEVTOOLS_HIDE_CONSOLE_LOGS_IN_STRICT_MODE__ ) ??
404401 false ;
405- const browserTheme =
406- castBrowserTheme ( window . __REACT_DEVTOOLS_BROWSER_THEME__ ) ?? 'dark' ;
407402
408403 patch ( {
409404 appendComponentStack,
410405 breakOnConsoleErrors,
411406 showInlineWarningsAndErrors,
412407 hideConsoleLogsInStrictMode,
413- browserTheme,
414408 } ) ;
415409}
416410
@@ -428,7 +422,6 @@ export function writeConsolePatchSettingsToWindow(
428422 settings . showInlineWarningsAndErrors ;
429423 window . __REACT_DEVTOOLS_HIDE_CONSOLE_LOGS_IN_STRICT_MODE__ =
430424 settings . hideConsoleLogsInStrictMode ;
431- window . __REACT_DEVTOOLS_BROWSER_THEME__ = settings . browserTheme ;
432425}
433426
434427export function installConsoleFunctionsToWindow(): void {
0 commit comments