mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
ebca638645
commit
ab3c2ce729
1 changed files with 3 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue