mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 14:28:49 +01:00
This commit is contained in:
parent
cf824af2b6
commit
466717aaac
1 changed files with 2 additions and 1 deletions
|
|
@ -56,7 +56,8 @@ export const loadAssets = (data: IAppearance) => {
|
|||
}
|
||||
|
||||
const iconDefaultScriptElement = document.getElementById("iconDefaultScript");
|
||||
const iconURL = `/appearance/icons/${["ant", "material"].includes(data.icon) ? data.icon : "material"}/icon.js?v=${data.iconVer}`;
|
||||
// 不能使用 data.iconVer,因为其他主题也需要加载默认图标,此时 data.iconVer 为其他图标的版本号
|
||||
const iconURL = `/appearance/icons/${["ant", "material"].includes(data.icon) ? data.icon : "material"}/icon.js?v=${Constants.SIYUAN_VERSION}`;
|
||||
if (iconDefaultScriptElement) {
|
||||
if (!iconDefaultScriptElement.getAttribute("src").startsWith(iconURL)) {
|
||||
iconDefaultScriptElement.remove();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue