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:
@@ -162,6 +162,15 @@ function loadHighlightingTheme(theme) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (theme === "none") {
|
||||||
|
// Deactivate the theme.
|
||||||
|
if (highlightingThemeEl) {
|
||||||
|
highlightingThemeEl.remove();
|
||||||
|
highlightingThemeEl = null;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!highlightingThemeEl) {
|
if (!highlightingThemeEl) {
|
||||||
highlightingThemeEl = $(`<link rel="stylesheet" type="text/css" />`);
|
highlightingThemeEl = $(`<link rel="stylesheet" type="text/css" />`);
|
||||||
$("head").append(highlightingThemeEl);
|
$("head").append(highlightingThemeEl);
|
||||||
|
|||||||
Reference in New Issue
Block a user