Skip to content

Commit

Permalink
fix: meetings with orphan todos let the meeting fail to show agreed n…
Browse files Browse the repository at this point in the history
…ext actions
  • Loading branch information
Carsten Koch committed Jan 27, 2025
1 parent 76fe5f7 commit 34da0fb
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions api/useMeetingTodos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ const mapMeetingTodo = (meeting: MeetingTodoData): MeetingTodo[] =>
flatMap(({ id: activityId, noteBlocks, noteBlockIds, forProjects }) =>
flow(
identity<typeof noteBlocks>,
filter((block) =>
noteBlocks.some(
(b) => noteBlockIds?.includes(b.id) && b.todo.id === block.todo.id
)
filter(
(block) =>
block.todo &&
noteBlocks.some(
(b) =>
b.todo &&
noteBlockIds?.includes(b.id) &&
b.todo.id === block.todo.id
)
),
map(
({ id: blockId, todo }): MeetingTodo => ({
Expand Down

0 comments on commit 34da0fb

Please sign in to comment.