mirror of
https://github.com/electron/electron.git
synced 2026-01-25 23:38:18 -05:00
remove check on items instance
This commit is contained in:
@@ -190,8 +190,7 @@ Menu.prototype.closePopup = function (window) {
|
||||
}
|
||||
|
||||
Menu.prototype.getMenuItemById = function (id) {
|
||||
let items = this
|
||||
if (items instanceof Menu) items = this.items
|
||||
const items = this.items
|
||||
|
||||
let found = items.find(item => item.id === id) || false
|
||||
for (let i = 0, length = items.length; !found && i < length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user