could the undefined already be a string perhaps?

This commit is contained in:
Chris Kruining 2024-12-04 10:19:12 +01:00
parent 6cf4bc450f
commit a976353890
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2

View file

@ -23,7 +23,7 @@ export default function Editor(props: ParentProps) {
const themeMenuId = createUniqueId();
const [commandPalette, setCommandPalette] = createSignal<CommandPaletteApi>();
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 = [