Fix TypeError: Cannot read property 'view' of undefined when clicking on some calendar favorites

This commit is contained in:
Nathan Gray 2014-02-12 16:17:58 +00:00
parent d68349fa1b
commit dfb1be231d

View File

@ -1080,7 +1080,7 @@ app.classes.calendar = AppJS.extend(
// old calendar state handling on server-side (incl. switching to and from listview)
var menuaction = 'calendar.calendar_uiviews.index';
if (typeof state.state != 'undefined' && state.state.view == 'undefined' || state.state.view == 'listview')
if (typeof state.state != 'undefined' && (state.state.view == 'undefined' || state.state.view == 'listview'))
{
// check if we already use et2 / are in listview
if (this.et2 || etemplate2 && etemplate2.getByApplication('calendar'))