From d6594dab0fb271fec9b8544318c6819c30ad7a0c Mon Sep 17 00:00:00 2001 From: Shane Maglangit Date: Mon, 13 Feb 2023 19:23:24 +0800 Subject: [PATCH] fix: add null check for userSchedule.availability (#7053) --- packages/core/getUserAvailability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/getUserAvailability.ts b/packages/core/getUserAvailability.ts index 02de43a249..79b1fd400a 100644 --- a/packages/core/getUserAvailability.ts +++ b/packages/core/getUserAvailability.ts @@ -231,7 +231,7 @@ export async function getUserAvailability( ? { ...eventType?.schedule } : { ...userSchedule, - availability: userSchedule.availability.map((a) => ({ + availability: userSchedule?.availability.map((a) => ({ ...a, userId: currentUser.id, })),