Add chaining to holiday detail and holiday type
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
4b6038d1d2
commit
b05c28f571
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue