Scheduling infrastructure for absolutely everyone.
fix: app crash issue on setting a greater recurring count than the maximum (#9899)
Pradumn Kumar878a7cbfc5f4
diff --git a/apps/web/components/booking/pages/AvailabilityPage.tsx b/apps/web/components/booking/pages/AvailabilityPage.tsxindex 24c6d438c89..c01d8e44b0b 100644--- a/apps/web/components/booking/pages/AvailabilityPage.tsx+++ b/apps/web/components/booking/pages/AvailabilityPage.tsx@@ -204,7 +204,13 @@ const AvailabilityPage = ({ profile, eventType, ...restProps }: Props) => {isFullWidth={false}className="me-2 inline w-16"onChange={(event) => {- setRecurringEventCount(parseInt(event?.target.value));+ const count =+ eventType?.recurringEvent?.count &&+ parseInt(event?.target.value) > eventType?.recurringEvent?.count+ ? eventType.recurringEvent.count+ : parseInt(event?.target.value);++ setRecurringEventCount(count);}}/>