From 2e0b8945cf533717de3003beb6dab091a9a13246 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 11 Sep 2023 13:58:13 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9156 --- app/src/config/about.ts | 2 +- app/src/protyle/toolbar/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/config/about.ts b/app/src/config/about.ts index 3103fd099..75d6c515b 100644 --- a/app/src/config/about.ts +++ b/app/src/config/about.ts @@ -148,7 +148,7 @@ export const about = { -
+
diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 22a5ec458..b5704c888 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -364,8 +364,8 @@ export class Toolbar { } } contents.childNodes.forEach((item: HTMLElement, index) => { - if (item.nodeType !== 3 && item.tagName !== "BR") { - const types = item.getAttribute("data-type").split(" "); + if (item.nodeType !== 3 && item.tagName !== "BR" && item.tagName !== "IMG") { + const types = (item.getAttribute("data-type") || "").split(" "); if (type === "clear") { for (let i = 0; i < types.length; i++) { if (textObj && textObj.type === "text") {