update mtching mapper to handle empty schedules

This commit is contained in:
Sylvain Briat
2024-03-28 17:20:51 +01:00
committed by sbriat
parent 5f8dd8b4a0
commit 924547c316

View File

@@ -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,