tods-competition-factory 1.8.8 → 1.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11106,7 +11106,11 @@ function getRounds({
11106
11106
  const keepComplete = !excludeCompletedRounds || !isComplete;
11107
11107
  const keepScheduled = !excludeScheduledRounds || !isScheduled;
11108
11108
  const event = venueId || scheduleDate ? events?.find(({ eventId }) => eventId === round.eventId) : void 0;
11109
- const validDate = !scheduleDate || event?.startDate && event?.endDate && new Date(scheduleDate) >= new Date(event?.startDate) && new Date(scheduleDate) <= new Date(event?.endDate);
11109
+ const startDate = event?.startDate || tournamentRecord?.startDate;
11110
+ const endDate = event?.endDate || tournamentRecord?.endDate;
11111
+ const validStartDate = !scheduleDate || !startDate || new Date(scheduleDate) >= new Date(startDate);
11112
+ const validEndDate = !scheduleDate || !endDate || new Date(scheduleDate) <= new Date(endDate);
11113
+ const validDate = validStartDate && validEndDate;
11110
11114
  const validVenue = !venueId || event?.validVenueIds.includes(venueId);
11111
11115
  const keepRound = keepComplete && keepScheduled && validVenue && validDate;
11112
11116
  if (!keepRound)