From a976353890b76ba28ffeec591e2acd18c204370a Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Wed, 4 Dec 2024 10:19:12 +0100 Subject: [PATCH] could the undefined already be a string perhaps? --- src/routes/(editor).tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/(editor).tsx b/src/routes/(editor).tsx index 1f8e550..b56221a 100644 --- a/src/routes/(editor).tsx +++ b/src/routes/(editor).tsx @@ -23,7 +23,7 @@ export default function Editor(props: ParentProps) { const themeMenuId = createUniqueId(); const [commandPalette, setCommandPalette] = createSignal(); - const colorScheme = createMemo(() => theme.colorScheme === ColorScheme.Auto ? event?.request.headers.get('Sec-CH-Prefers-Color-Scheme') ?? 'light dark' : theme.colorScheme); + const colorScheme = createMemo(() => (theme.colorScheme === ColorScheme.Auto ? event?.request.headers.get('Sec-CH-Prefers-Color-Scheme') : theme.colorScheme) ?? 'light dark'); const lightness = createMemo(() => colorScheme() === ColorScheme.Light ? .9 : .2); const commands = [