conform to linter standard
This commit is contained in:
parent
ea42851c9b
commit
5217718d7b
1 changed files with 6 additions and 6 deletions
|
@ -191,16 +191,16 @@ Menu.prototype.closePopup = function (window) {
|
||||||
|
|
||||||
Menu.prototype.getMenuItemById = function (items, id) {
|
Menu.prototype.getMenuItemById = function (items, id) {
|
||||||
if (items instanceof Menu) {
|
if (items instanceof Menu) {
|
||||||
items = items.items;
|
items = items.items
|
||||||
}
|
}
|
||||||
let found = items.find(item => item.id === id) || false;
|
let found = items.find(item => item.id === id) || false
|
||||||
for(let i = 0, length = items.length; !found && i < length; i++) {
|
for (let i = 0, length = items.length; !found && i < length; i++) {
|
||||||
if (items[i].submenu) {
|
if (items[i].submenu) {
|
||||||
found = this.getMenuItemById(items[i].submenu, id);
|
found = this.getMenuItemById(items[i].submenu, id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return found;
|
return found
|
||||||
};
|
}
|
||||||
|
|
||||||
Menu.prototype.append = function (item) {
|
Menu.prototype.append = function (item) {
|
||||||
return this.insert(this.getItemCount(), item)
|
return this.insert(this.getItemCount(), item)
|
||||||
|
|
Loading…
Reference in a new issue