Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: do not mark task list as completed if there are no items

Abdullah Atta6127eb97af01
diff --git a/packages/editor/src/extensions/task-list/component.tsx b/packages/editor/src/extensions/task-list/component.tsx
index 0ff1b1964..f96b2f601 100644
--- a/packages/editor/src/extensions/task-list/component.tsx
+++ b/packages/editor/src/extensions/task-list/component.tsx
@@ -36,7 +36,7 @@ export function TaskListComponent(
const { editor, getPos, node, updateAttributes, forwardRef, pos } = props;
const { title, textDirection, readonly, stats } = node.attrs;
const isMobile = useIsMobile();
- const checked = stats.total === stats.checked;
+ const checked = stats.total > 0 && stats.total === stats.checked;
const isNested = useMemo(() => {
if (!pos) return false;