From 51725d71cb622c3f50788cfbb7799d5712a8908a Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 12 May 2025 22:07:43 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14807 --- app/src/protyle/wysiwyg/remove.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/remove.ts b/app/src/protyle/wysiwyg/remove.ts index 57b9bacce..e6d3a52e5 100644 --- a/app/src/protyle/wysiwyg/remove.ts +++ b/app/src/protyle/wysiwyg/remove.ts @@ -437,7 +437,7 @@ export const removeBlock = async (protyle: IProtyle, blockElement: Element, rang // https://github.com/siyuan-note/siyuan/issues/14807 if (previousLastEditElement) { let previousLastChild = previousLastEditElement.lastChild; - if (previousLastChild.nodeType === 3) { + if (previousLastChild && previousLastChild.nodeType === 3) { if (!previousLastChild.textContent) { previousLastChild = hasPreviousSibling(previousLastChild) as ChildNode; }