From 04c86bc6b203271b6be8dcd658cd69cd5a196ad4 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 20 Sep 2023 16:58:59 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9237 --- app/src/protyle/wysiwyg/list.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/wysiwyg/list.ts b/app/src/protyle/wysiwyg/list.ts index 84922ce3e..177bbc6eb 100644 --- a/app/src/protyle/wysiwyg/list.ts +++ b/app/src/protyle/wysiwyg/list.ts @@ -651,7 +651,8 @@ export const listOutdent = (protyle: IProtyle, liItemElements: Element[], range: action: "insert", id: parentLiItemElement.getAttribute("data-node-id"), data: parentLiItemElement.outerHTML, - previousID: parentLiItemElement.previousElementSibling.getAttribute("data-node-id") + previousID: parentLiItemElement.previousElementSibling?.getAttribute("data-node-id"), + parentID: parentLiItemElement.parentElement.getAttribute("data-node-id"), }); parentLiItemElement.remove(); } else if (liElement.childElementCount === 1) {