From cbde1b5664a58414274a782f09804bbc4e79c587 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 10 Nov 2015 20:04:17 +0000 Subject: [PATCH] Avoid error when closing home tab if calendar tab is not loaded --- calendar/js/app.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index e48448924b..d3e1c58134 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -106,9 +106,12 @@ app.classes.calendar = AppJS.extend( delete window.top.app.calendar; } jQuery('body').off('.calendar'); - - var date = this.sidebox_et2.getWidgetById('date'); - $j(window).off('resize.calendar'+date.dom_id); + + if(this.sidebox_et2) + { + var date = this.sidebox_et2.getWidgetById('date'); + $j(window).off('resize.calendar'+date.dom_id); + } egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_UP, false, false, false); egw_unregisterGlobalShortcut(jQuery.ui.keyCode.PAGE_DOWN, false, false, false);