Skip to content

Commit

Permalink
fix issue with null related events
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkLark86 committed Dec 3, 2024
1 parent 5fc066a commit dcfed5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/utils/planning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ export function pickRelatedEventsForPlanning(
const events = events_ ?? [];
const allowedEventIds = new Set(getRelatedEventIdsForPlanning(planning, purpose === 'logic' ? 'primary' : null));

return events.filter((event) => allowedEventIds.has(event._id));
return events.filter((event) => event && allowedEventIds.has(event._id));
}

export function pickRelatedEventIdsForPlanning(
Expand Down

0 comments on commit dcfed5c

Please sign in to comment.