From f3d49fe59e4f842f883cf5aaeb6dc8390b9835c5 Mon Sep 17 00:00:00 2001 From: zomars Date: Sat, 11 Jun 2022 16:40:00 -0600 Subject: [PATCH] Fixed empty array as truthy --- packages/core/getBusyTimes.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/getBusyTimes.ts b/packages/core/getBusyTimes.ts index 5f2e9706f2..01db8c29d8 100644 --- a/packages/core/getBusyTimes.ts +++ b/packages/core/getBusyTimes.ts @@ -33,7 +33,7 @@ export async function getBusyTimes(params: { }) .then((bookings) => bookings.map(({ startTime, endTime }) => ({ end: endTime, start: startTime }))); - if (credentials) { + if (credentials.length > 0) { const calendarBusyTimes = await getBusyCalendarTimes(credentials, startTime, endTime, selectedCalendars); console.log("calendarBusyTimes", calendarBusyTimes); busyTimes.push(...calendarBusyTimes);