diff --git a/src/pages/Worker/Card/WorkerCalendar.vue b/src/pages/Worker/Card/WorkerCalendar.vue index 06cb69f5c..0ce4f5c34 100644 --- a/src/pages/Worker/Card/WorkerCalendar.vue +++ b/src/pages/Worker/Card/WorkerCalendar.vue @@ -56,8 +56,8 @@ const onFetchAbsences = (data) => { if (data.holidays) { data.holidays.forEach((holiday) => { - const holidayDetail = holiday.detail && holiday.detail.name; - const holidayType = holiday.type && holiday.type.name; + const holidayDetail = holiday?.detail?.name; + const holidayType = holiday?.type?.name; const holidayName = holidayDetail || holidayType; addEvent(