From 0b6f24a21ae05942d27dcc7092d94b312c5779d1 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 10 Oct 2024 23:22:18 +0800 Subject: [PATCH] chore: update task complete --- web/src/components/MemoEditor/Editor/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/MemoEditor/Editor/index.tsx b/web/src/components/MemoEditor/Editor/index.tsx index b55b0aa8..fa56b729 100644 --- a/web/src/components/MemoEditor/Editor/index.tsx +++ b/web/src/components/MemoEditor/Editor/index.tsx @@ -166,8 +166,8 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef< let insertText = ""; if (lastNode.type === NodeType.TASK_LIST_ITEM) { - const { complete } = lastNode.taskListItemNode as TaskListItemNode; - insertText = complete ? "- [x] " : "- [ ] "; + const { symbol } = lastNode.taskListItemNode as TaskListItemNode; + insertText = `${symbol} [ ] `; } else if (lastNode.type === NodeType.UNORDERED_LIST_ITEM) { const { symbol } = lastNode.unorderedListItemNode as UnorderedListItemNode; insertText = `${symbol} `;