refactor: remove redundant isRecurring property, use recurrenceRule instead

isRecurring was redundant since recurrenceRule as truthy/falsy check suffices.
Removed from shared CalendarEvent type, Mongoose virtual, and all usages.
This commit is contained in:
2026-02-07 16:16:35 +01:00
parent 1092ff2648
commit 81221d8b70
6 changed files with 10 additions and 20 deletions

View File

@@ -48,7 +48,7 @@ export function expandRecurringEvents(
// to find events that start before rangeStart but extend into the range
const adjustedRangeStart = new Date(rangeStart.getTime() - duration);
if (!event.isRecurring || !event.recurrenceRule) {
if (!event.recurrenceRule) {
// Non-recurring event: add if it overlaps with the range
if (endTime >= rangeStart && startTime <= rangeEnd) {
expanded.push({