From 81e202342e7375afb2a755682a9f3c5f53dc36e4 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 26 Apr 2024 16:20:25 +0200 Subject: [PATCH] Various minor JS errors in calendar_default_view.js --- assets/js/utils/calendar_default_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js index e8e625d5..4d7b7805 100755 --- a/assets/js/utils/calendar_default_view.js +++ b/assets/js/utils/calendar_default_view.js @@ -211,7 +211,7 @@ App.Utils.CalendarDefaultView = (function () { $popoverTarget.popover('dispose'); } - if (lastFocusedEventData.extendedProps.data.workingPlanException) { + if (lastFocusedEventData.extendedProps.data.workingPlanException !== undefined) { const providerId = $selectFilterItem.val(); const provider = vars('available_providers').find( @@ -1256,7 +1256,7 @@ App.Utils.CalendarDefaultView = (function () { calendarEventSource.push(unavailabilityEvent); }); - response.blocked_periods.forEach((blockedPeriod) => { + response?.blocked_periods?.forEach((blockedPeriod) => { const blockedPeriodEvent = { title: blockedPeriod.name, start: moment(blockedPeriod.start_datetime).toDate(),