From 444307e08b03dec2d329ded0916d39b63e89dcc3 Mon Sep 17 00:00:00 2001 From: tomdyqin Date: Thu, 19 Dec 2024 16:43:04 +0800 Subject: [PATCH] fix: action_item not checked --- .../markdown/src/lib/remark-slate/remarkDefaultElementRules.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts b/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts index 06379ba181..9805959048 100644 --- a/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts +++ b/packages/markdown/src/lib/remark-slate/remarkDefaultElementRules.ts @@ -82,7 +82,7 @@ export const remarkDefaultElementRules: RemarkElementRules = { _node.children?.forEach((listItem) => { const defaultType = options.editor.getType({ key: 'p' }); const todoListType = options.editor.getType({ key: 'action_item' }) ?? defaultType - const listItemType = listItem.checked ? todoListType : defaultType; + const listItemType = typeof listItem.checked !== 'undefined' ? todoListType : defaultType; if (!listItem.children) { listItems.push({ children: remarkTransformElementChildren(listItem, options),