From b43f45496b8854ab6f3d7b878c757055be7c06df Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 16 May 2022 10:47:20 +0800 Subject: [PATCH] :art: fix https://github.com/Vanessa219/vditor/issues/1230 --- CHANGELOG.md | 2 ++ src/ts/ui/setContentTheme.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f7374d4f..c78f8d99f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -97,6 +97,8 @@ ### v3.8.15 / 2022-06 +* [1230](https://github.com/Vanessa219/vditor/issues/1230) cnd preview path 重复加载问题 `改进功能` + ### v3.8.14 / 2022-05 * [1223](https://github.com/Vanessa219/vditor/issues/1223) 关于有时显示不完整 `修复缺陷` diff --git a/src/ts/ui/setContentTheme.ts b/src/ts/ui/setContentTheme.ts index 677f50b07..dbe99137f 100644 --- a/src/ts/ui/setContentTheme.ts +++ b/src/ts/ui/setContentTheme.ts @@ -8,7 +8,7 @@ export const setContentTheme = (contentTheme: string, path: string) => { const cssPath = `${path}/${contentTheme}.css`; if (!vditorContentTheme) { addStyle(cssPath, "vditorContentTheme"); - } else if (vditorContentTheme.href !== cssPath) { + } else if (vditorContentTheme.getAttribute("href") !== cssPath) { vditorContentTheme.remove(); addStyle(cssPath, "vditorContentTheme"); }