diff --git a/packages/features/schedules/lib/use-schedule/useNonEmptyScheduleDays.ts b/packages/features/schedules/lib/use-schedule/useNonEmptyScheduleDays.ts index d7945cf311..eca607c322 100644 --- a/packages/features/schedules/lib/use-schedule/useNonEmptyScheduleDays.ts +++ b/packages/features/schedules/lib/use-schedule/useNonEmptyScheduleDays.ts @@ -3,7 +3,7 @@ import { useMemo } from "react"; import type { Slots } from "../use-schedule"; export const getNonEmptyScheduleDays = (slots?: Slots) => { - if (typeof slots === "undefined") return null; + if (typeof slots === "undefined") return []; return Object.keys(slots).filter((day) => slots[day].length > 0); };