From afdee4b2eb7676e55c38a4c0373b3e4827acf4fa Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 19 Jun 2019 09:19:01 -0600 Subject: [PATCH] Calendar - Fix js error reading holiday event preference --- calendar/js/et2_widget_daycol.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index efe58cfb9d..1a17666f88 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -418,7 +418,15 @@ var et2_calendar_daycol = (function(){ "use strict"; return et2_valueWidget.exte // Holidays and birthdays var holidays = et2_calendar_view.get_holidays(this,this.options.date.substring(0,4)); var holiday_list = []; - var holiday_pref = (egw.preference('birthdays_as_events','calendar')||'').split(','); + var holiday_pref = (egw.preference('birthdays_as_events','calendar')||[]); + if(typeof holiday_pref === 'string') + { + holiday_pref = holiday_pref.split(','); + } + else + { + holiday_pref = jQuery.extend([], holiday_pref); + } // Show holidays as events on mobile or by preference var holidays_as_events = egwIsMobile() || egw.preference('birthdays_as_events','calendar') === true ||