Hotfix: bookings/past browser crash

pull/5050/head^2
zomars 2022-10-17 11:08:49 -06:00
parent 33d71f2390
commit 1aade4fc57
1 changed files with 7 additions and 6 deletions

View File

@ -17,8 +17,8 @@ import Badge from "@calcom/ui/v2/core/Badge";
import Button from "@calcom/ui/v2/core/Button"; import Button from "@calcom/ui/v2/core/Button";
import useMeQuery from "@lib/hooks/useMeQuery"; import useMeQuery from "@lib/hooks/useMeQuery";
import { extractRecurringDates } from "@lib/parseDate";
// import { extractRecurringDates } from "@lib/parseDate";
import { EditLocationDialog } from "@components/dialog/EditLocationDialog"; import { EditLocationDialog } from "@components/dialog/EditLocationDialog";
import { RescheduleDialog } from "@components/dialog/RescheduleDialog"; import { RescheduleDialog } from "@components/dialog/RescheduleDialog";
import TableActions, { ActionType } from "@components/ui/TableActions"; import TableActions, { ActionType } from "@components/ui/TableActions";
@ -175,12 +175,13 @@ function BookingListItem(booking: BookingItemProps) {
}; };
// Calculate the booking date(s) and setup recurring event data to show // Calculate the booking date(s) and setup recurring event data to show
let recurringStrings: string[] = []; const recurringStrings: string[] = [];
let recurringDates: Date[] = []; const recurringDates: Date[] = [];
if (booking.recurringBookings !== undefined && booking.eventType.recurringEvent?.freq !== undefined) { // @FIXME: This is importing the RRULE library which is already heavy. Find out a more optimal way do this.
[recurringStrings, recurringDates] = extractRecurringDates(booking, user?.timeZone, i18n); // if (booking.recurringBookings !== undefined && booking.eventType.recurringEvent?.freq !== undefined) {
} // [recurringStrings, recurringDates] = extractRecurringDates(booking, user?.timeZone, i18n);
// }
const location = booking.location || ""; const location = booking.location || "";