fix: type error in booker (#11011)

pull/10785/head^2
Udit Takkar 2023-08-29 22:57:06 +05:30 committed by GitHub
parent 79f092673a
commit 99a5dcf96a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ import { useMemo } from "react";
import type { Slots } from "../use-schedule"; import type { Slots } from "../use-schedule";
export const getNonEmptyScheduleDays = (slots?: Slots) => { 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); return Object.keys(slots).filter((day) => slots[day].length > 0);
}; };