Calendar - avoid errors from holidays if no country set

This commit is contained in:
nathangray 2017-10-04 09:21:16 -06:00
parent 3314ca2ea0
commit 5183aa2a19

View File

@ -633,7 +633,9 @@ jQuery.extend(et2_calendar_view,
{
// Loaded in an iframe or something
var view = egw.window.et2_calendar_view ? egw.window.et2_calendar_view : this;
if(!view) return {};
// No country selected causes error, so skip if it's missing
if(!view || !egw.preference('country','common')) return {};
var cache = view.holiday_cache[year];
if (typeof cache == 'undefined')