diff --git a/apps/web/lib/slots.ts b/apps/web/lib/slots.ts index f7011edf47..758b2823da 100644 --- a/apps/web/lib/slots.ts +++ b/apps/web/lib/slots.ts @@ -100,7 +100,15 @@ const getSlots = ({ inviteeDate, frequency, minimumBookingNotice, workingHours, slots.push(slot); } }); - return slots; + + const uniq = (a: Dayjs[]) => { + const seen: Record = {}; + return a.filter((item) => { + return seen.hasOwnProperty(item.format()) ? false : (seen[item.format()] = true); + }); + }; + + return uniq(slots); }; export default getSlots;