fix: app crash issue on setting a greater recurring count than the maximum (#9899)
This commit is contained in:
@@ -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);
|
||||
}}
|
||||
/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user