mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
client: Fix color theme leak when deactivating highlighting
This commit is contained in:
parent
c3e10b2b76
commit
4d783f1879
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user