Add chaining to holiday detail and holiday type
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
William Buezas 2024-04-09 08:57:39 -03:00
parent 4b6038d1d2
commit b05c28f571
1 changed files with 2 additions and 2 deletions

View File

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