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
client: Fix color theme leak when deactivating highlighting
Elian Doran4d783f187916
diff --git a/src/public/app/services/library_loader.js b/src/public/app/services/library_loader.jsindex a6b7700384..f5299ae331 100644--- a/src/public/app/services/library_loader.js+++ b/src/public/app/services/library_loader.js@@ -158,7 +158,16 @@ async function requireCss(url, prependAssetPath = true) {let highlightingThemeEl = null;function loadHighlightingTheme(theme) {- if (!theme) {+ if (!theme) {+ return;+ }++ if (theme === "none") {+ // Deactivate the theme.+ if (highlightingThemeEl) {+ highlightingThemeEl.remove();+ highlightingThemeEl = null;+ }return;}