Fix syntax
This commit is contained in:
parent
d45914c3f7
commit
b8ec84c761
1 changed files with 2 additions and 1 deletions
|
@ -11,8 +11,9 @@ const MenuItem = function (options) {
|
||||||
for (let key in options) {
|
for (let key in options) {
|
||||||
if (!(key in this)) this[key] = options[key]
|
if (!(key in this)) this[key] = options[key]
|
||||||
}
|
}
|
||||||
if (typeof this.role === 'string' || this.role instanceof String)
|
if (typeof this.role === 'string' || this.role instanceof String) {
|
||||||
this.role = this.role.toLowerCase()
|
this.role = this.role.toLowerCase()
|
||||||
|
}
|
||||||
this.submenu = this.submenu || roles.getDefaultSubmenu(this.role)
|
this.submenu = this.submenu || roles.getDefaultSubmenu(this.role)
|
||||||
if (this.submenu != null && this.submenu.constructor !== Menu) {
|
if (this.submenu != null && this.submenu.constructor !== Menu) {
|
||||||
this.submenu = Menu.buildFromTemplate(this.submenu)
|
this.submenu = Menu.buildFromTemplate(this.submenu)
|
||||||
|
|
Loading…
Reference in a new issue