From ab3c2ce729a9ff63b87511b5d53b3fb8cbc8160e Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 8 Feb 2024 15:18:03 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/10341 --- app/src/util/assets.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/util/assets.ts b/app/src/util/assets.ts index 4f5cf834b..c4cd37ef9 100644 --- a/app/src/util/assets.ts +++ b/app/src/util/assets.ts @@ -85,10 +85,9 @@ export const loadAssets = (data: IAppearance) => { const themeScriptElement = document.getElementById("themeScript"); const themeScriptAddress = `/appearance/themes/${data.mode === 1 ? data.themeDark : data.themeLight}/theme.js?v=${data.themeVer}`; if (themeScriptElement) { - if (!themeScriptElement.getAttribute("src").startsWith(themeScriptAddress)) { - themeScriptElement.remove(); - addScript(themeScriptAddress, "themeScript"); - } + // https://github.com/siyuan-note/siyuan/issues/10341 + themeScriptElement.remove(); + addScript(themeScriptAddress, "themeScript"); } else { addScript(themeScriptAddress, "themeScript"); }