diff --git a/plugs/tasks/task.ts b/plugs/tasks/task.ts index d6154dd5..a2fac5c6 100644 --- a/plugs/tasks/task.ts +++ b/plugs/tasks/task.ts @@ -62,6 +62,7 @@ export async function indexTasks({ name, tree }: IndexTreeEvent) { let currentState = taskStates.get(state); if (!currentState) { currentState = { count: 0, firstPos: n.from! }; + taskStates.set(state, currentState); } currentState.count++; }