mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 05:46:10 +01:00
client: Fix color theme leak when deactivating highlighting
This commit is contained in:
@@ -158,7 +158,16 @@ async function requireCss(url, prependAssetPath = true) {
|
|||||||
|
|
||||||
let highlightingThemeEl = null;
|
let highlightingThemeEl = null;
|
||||||
function loadHighlightingTheme(theme) {
|
function loadHighlightingTheme(theme) {
|
||||||
if (!theme) {
|
if (!theme) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (theme === "none") {
|
||||||
|
// Deactivate the theme.
|
||||||
|
if (highlightingThemeEl) {
|
||||||
|
highlightingThemeEl.remove();
|
||||||
|
highlightingThemeEl = null;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user