From 38832103320a514aa9248f39dd65d40aa6e74cd6 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 16 Jun 2022 21:15:37 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/5208 --- app/src/protyle/wysiwyg/list.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 90b198ae0..0e6af49c4 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -245,7 +245,7 @@ export const breakList = (protyle: IProtyle, blockElement: Element, range: Range id: listItemId, action: "insert", data: listItemElement.outerHTML, - previousID: listItemElement.previousElementSibling.getAttribute("data-node-id"), + previousID: listItemElement.previousElementSibling?.getAttribute("data-node-id"), parentID: listItemElement.parentElement.getAttribute("data-node-id") }); listItemElement.remove();