Skip to content
2 changes: 1 addition & 1 deletion apps/web/components/booking/BookingListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ const RecurringBookingsTooltip = ({

return (
(booking.recurringInfo &&
booking.eventType?.recurringEvent?.freq &&
booking.eventType?.recurringEvent?.freq != null &&
(booking.listingStatus === "recurring" ||
booking.listingStatus === "unconfirmed" ||
booking.listingStatus === "cancelled") && (
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/recurringStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const getEveryFreqFor = ({
recurringCount?: number;
recurringFreq?: string;
}): string => {
if (recurringEvent.freq) {
if (recurringEvent.freq != null) {
return `${recurringFreq || getRecurringFreq({ t, recurringEvent })} ${
recurringCount || recurringEvent.count
} ${t("occurrence", {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { showToast } from "@calcom/ui/components/toast";
import { getUtmTrackingParameters } from "../../lib/getUtmTrackingParameters";
import type { UseCreateBookingInput } from "./useCreateBooking";

type Callbacks = { onSuccess?: () => void; onError?: (err: any) => void };
type Callbacks = { onSuccess?: () => void; onError?: (err: unknown) => void };
type UseHandleBookingProps = {
bookingForm: UseBookingFormReturnType["bookingForm"];
event?: {
Expand Down Expand Up @@ -64,8 +64,8 @@ export const useHandleBookEvent = ({
const crmAppSlug = useBookerStoreContext((state) => state.crmAppSlug);
const crmRecordId = useBookerStoreContext((state) => state.crmRecordId);
const verificationCode = useBookerStoreContext((state) => state.verificationCode);
const handleError = (err: any) => {
const errorMessage = err?.message ? t(err.message) : t("can_you_try_again");
const handleError = (err: unknown) => {
const errorMessage = err instanceof Error ? t(err.message) : t("can_you_try_again");
showToast(errorMessage, "error");
};
const searchParams = useSearchParams();
Expand Down Expand Up @@ -121,7 +121,7 @@ export const useHandleBookEvent = ({

if (isInstantMeeting) {
handleInstantBooking(mapBookingToMutationInput(bookingInput), callbacks);
} else if (event.data?.recurringEvent?.freq && recurringEventCount && !rescheduleUid) {
} else if (event.data?.recurringEvent?.freq != null && recurringEventCount && !rescheduleUid) {
handleRecBooking(
mapRecurringBookingToMutationInput(bookingInput, recurringEventCount, tracking),
callbacks
Expand Down
Loading