fix: add null check for userSchedule.availability (#7053)

pull/7071/head
Shane Maglangit 2023-02-13 19:23:24 +08:00 committed by GitHub
parent 5fcfbb2d90
commit d6594dab0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -231,7 +231,7 @@ export async function getUserAvailability(
? { ...eventType?.schedule } ? { ...eventType?.schedule }
: { : {
...userSchedule, ...userSchedule,
availability: userSchedule.availability.map((a) => ({ availability: userSchedule?.availability.map((a) => ({
...a, ...a,
userId: currentUser.id, userId: currentUser.id,
})), })),