Prevent undefined errors on dashboard view

Changeset c2b74d2ff7ed does not work for dashboard view, as it has no related
screen and it does not have the same tab options as form tabs
issue6867
review36721002
This commit is contained in:
Sergi Almacellas Abellana
2017-10-20 14:55:55 +02:00
parent 4dd5606a08
commit 73da7e8710
+3 -2
View File
@@ -61,7 +61,8 @@
icon: 'glyphicon-time',
label: Sao.i18n.gettext('View Logs...'),
}, {
id: Sao.common.MODELHISTORY.contains(this.screen.model_name) ?
id: (this.screen &&
Sao.common.MODELHISTORY.contains(this.screen.model_name)) ?
'revision': null,
icon: 'glyphicon-time',
label: Sao.i18n.gettext('Show revisions...'),
@@ -197,7 +198,7 @@
group = null;
return;
}
if (!item.id) {
if (!item.id || !this[item.id]) {
return;
}
if (!group) {