Make sure top actually has app before calling it.

Fixes error in calendar where non-list views are still in an iframe, but top window has no app.js
This commit is contained in:
Nathan Gray 2014-04-30 16:25:05 +00:00
parent 7c5db56d61
commit 140a0746d1

View File

@ -100,7 +100,7 @@ var AppJS = Class.extend(
sidebox= $j('#favorite_sidebox_'+this.appname,egw_fw.sidemenuDiv);
}
// Make sure we're running in the top window when we init sidebox
if(window.top.app[this.appname] !== this)
if(window.top.app[this.appname] !== this && window.top.app[this.appname])
{
window.top.app[this.appname]._init_sidebox(sidebox);
}