Avoid js error on first calendar load when there are no preferences yet

This commit is contained in:
Nathan Gray 2015-12-16 00:23:25 +00:00
parent eb73fb2ec3
commit 67652ccaf1

View File

@ -59,7 +59,7 @@ app.classes.calendar = AppJS.extend(
*/
state: {
date: new Date(),
view: egw.preference('saved_states','calendar').view || egw.preference('defaultcalendar','calendar') || 'day',
view: egw.preference('saved_states','calendar') ? egw.preference('saved_states','calendar').view : egw.preference('defaultcalendar','calendar') || 'day',
owner: egw.user('account_id')
},