Vanessa 2025-05-12 22:07:43 +08:00
parent a9132e9af4
commit 51725d71cb

View file

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