Make sure the params exists before addressing it

This commit is contained in:
Hadi Nategh 2020-11-03 11:47:26 +01:00
parent e34e18757e
commit f064ff8242

View File

@ -224,7 +224,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
url = this.link(url, params);
}
if (target == '_tab') return {url: url};
if (type == 'view' && params.target == 'tab') {
if (type == 'view' && params && params.target == 'tab') {
return this.openTab(params[app_registry['view_id']], app, type, params, {
id: params[app_registry['view_id']] + '-' + this.appName,
icon: params['icon'],