Scheduling infrastructure for absolutely everyone.
Urgent fix for team bookings (#2352)
Omar Lópezf2436d2a04fc
diff --git a/apps/web/lib/hooks/useSlots.ts b/apps/web/lib/hooks/useSlots.tsindex ce400e42add..a54e31e599c 100644--- a/apps/web/lib/hooks/useSlots.ts+++ b/apps/web/lib/hooks/useSlots.ts@@ -44,7 +44,7 @@ type getFilteredTimesProps = {export const getFilteredTimes = (props: getFilteredTimesProps) => {const { times, busy, eventLength, beforeBufferTime, afterBufferTime } = props;- const finalizationTime = times[times.length - 1].add(eventLength, "minutes");+ const finalizationTime = times[times.length - 1]?.add(eventLength, "minutes");// Check for conflictsfor (let i = times.length - 1; i >= 0; i -= 1) {// const totalSlotLength = eventLength + beforeBufferTime + afterBufferTime;