refactor: return null when passing empty menu templates (#23364)
This commit is contained in:
parent
59c1c12e0b
commit
0f0cc51b35
4 changed files with 11 additions and 13 deletions
|
@ -16,7 +16,7 @@ const MenuItem = function (options) {
|
|||
}
|
||||
this.submenu = this.submenu || roles.getDefaultSubmenu(this.role);
|
||||
if (this.submenu != null && this.submenu.constructor !== Menu) {
|
||||
this.submenu = Menu.buildFromTemplate(this.submenu, true);
|
||||
this.submenu = Menu.buildFromTemplate(this.submenu);
|
||||
}
|
||||
if (this.type == null && this.submenu != null) {
|
||||
this.type = 'submenu';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue