Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Fix theme switcher showing wrong value
Zerebos3dc3f1579b4e
diff --git a/src/scripts/modules/theme.ts b/src/scripts/modules/theme.tsindex 35a2400c28..31d1f0ffd6 100644--- a/src/scripts/modules/theme.ts+++ b/src/scripts/modules/theme.ts@@ -12,6 +12,7 @@ if (preference) {export default function setupThemeSelector() {const themeSwitch: HTMLInputElement = document.querySelector(".theme-selection input")!;+ themeSwitch.checked = preference ? preference === "dark" : true;themeSwitch?.addEventListener("change", () => {if (themeSwitch.checked) {document.body.classList.add("theme-dark");