Make sure data is available before using it

This commit is contained in:
Hadi Nategh 2018-12-13 15:29:31 +01:00
parent bde724d29f
commit feac8a1e80

View File

@ -99,7 +99,9 @@ function egwMenuImpl(_structure)
// Add disableIfNoEPL class to the relevant action's DOM
for(var i in this.dhtmlxmenu.idPull)
{
if (this.dhtmlxmenu.userData[i+'_egw_menu'] && this.dhtmlxmenu.userData[i+'_egw_menu']['data']['disableIfNoEPL'])
if (this.dhtmlxmenu.userData[i+'_egw_menu'] &&
this.dhtmlxmenu.userData[i+'_egw_menu']['data'] &&
this.dhtmlxmenu.userData[i+'_egw_menu']['data']['disableIfNoEPL'])
{
this.dhtmlxmenu.idPull[i].className += ' disableIfNoEPL';
}