diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index c9d78e3..a625b8f 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -19,7 +19,7 @@ export const Route = createRootRouteWithContext<{ beforeLoad: () => { const theme = localStorage.getItem("color-scheme") || "auto" const isDark = window.matchMedia("(prefers-color-scheme: dark)").matches - if (!theme ? isDark : theme === "dark") { + if (theme === "auto" ? isDark : theme === "dark") { document.documentElement.classList.add("dark") }