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; }