client: Fix color theme leak when deactivating highlighting

This commit is contained in:
Elian Doran 2024-10-31 21:45:06 +02:00
parent c3e10b2b76
commit 4d783f1879
No known key found for this signature in database

View File

@ -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;
}