From 984a7f6f721633b2bd0debd7daf7a4ac67ae59d5 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 18 May 2016 11:30:02 -0600 Subject: [PATCH] Avoid exception if use_time_grid preference is not set --- calendar/js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index b90aac1a5d..357c44f020 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -3601,7 +3601,10 @@ app.classes.calendar = (function(){ "use strict"; return AppJS.extend( */ granularity: function(state) { var list = egw.preference('use_time_grid','calendar'); - if(list === 0) return parseInt(egw.preference('interval','calendar')) || 30; + if(list === 0 || typeof list === 'undefined') + { + return parseInt(egw.preference('interval','calendar')) || 30; + } if(typeof list == 'string') list = list.split(','); if(!list.indexOf && jQuery.isPlainObject(list)) {