diff --git a/modules/worker/front/calendar/index.js b/modules/worker/front/calendar/index.js index dafa1d24d..bfb313630 100644 --- a/modules/worker/front/calendar/index.js +++ b/modules/worker/front/calendar/index.js @@ -40,10 +40,14 @@ class Controller { const holidays = data.holidays; const events = []; holidays.forEach(holiday => { + const holidayDetail = holiday.detail && holiday.detail.description; + const holidayType = holiday.type && holiday.type.name; + const holidayName = holidayDetail || holidayType; + events.push({ dated: holiday.dated, className: 'red', - title: holiday.detail.description || holiday.type.name, + title: holidayName, isRemovable: false }); });