mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
change default to null
This commit is contained in:
@@ -192,7 +192,7 @@ Menu.prototype.closePopup = function (window) {
|
||||
Menu.prototype.getMenuItemById = function (id) {
|
||||
const items = this.items
|
||||
|
||||
let found = items.find(item => item.id === id) || false
|
||||
let found = items.find(item => item.id === id) || null
|
||||
for (let i = 0, length = items.length; !found && i < length; i++) {
|
||||
if (items[i].submenu) {
|
||||
found = items[i].submenu.getMenuItemById(id)
|
||||
|
||||
Reference in New Issue
Block a user