From 924547c31670994170dafdb4971600e23b6ad269 Mon Sep 17 00:00:00 2001 From: Sylvain Briat Date: Thu, 28 Mar 2024 17:20:51 +0100 Subject: [PATCH] update mtching mapper to handle empty schedules --- src/modules/ad/matching.mapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/ad/matching.mapper.ts b/src/modules/ad/matching.mapper.ts index 700d260..351b469 100644 --- a/src/modules/ad/matching.mapper.ts +++ b/src/modules/ad/matching.mapper.ts @@ -64,7 +64,7 @@ export class MatchingMapper toDate: entity.getProps().query.toDate, schedule: entity .getProps() - .query.schedule.map((scheduleItem: ScheduleItem) => ({ + .query.schedule?.map((scheduleItem: ScheduleItem) => ({ day: scheduleItem.day, time: scheduleItem.time, margin: scheduleItem.margin,