From a4ae8d6b351270978493ff8f6f0b8774fdc54b04 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 21 Oct 2022 10:53:49 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6284 --- app/src/protyle/toolbar/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index f9dff97c2..02d66eb03 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -517,7 +517,8 @@ export class Toolbar { const currentNewNode = newNodes[i] as HTMLElement; const nextNewNode = newNodes[i + 1] as HTMLElement; if (currentNewNode.nodeType !== 3 && nextNewNode && nextNewNode.nodeType !== 3 && - isArrayEqual(nextNewNode.getAttribute("data-type").split(" "), currentNewNode.getAttribute("data-type").split(" ")) && + nextNewNode.tagName === currentNewNode.tagName && + isArrayEqual((nextNewNode.getAttribute("data-type") || "").split(" "), (currentNewNode.getAttribute("data-type") || "").split(" ")) && currentNewNode.getAttribute("data-id") === nextNewNode.getAttribute("data-id") && currentNewNode.getAttribute("data-subtype") === nextNewNode.getAttribute("data-subtype") && currentNewNode.style.color === nextNewNode.style.color &&