change default to null

This commit is contained in:
Shelley Vohr 2017-09-26 20:35:14 -04:00
parent 3c6a7c332a
commit c932871bb1
No known key found for this signature in database
GPG key ID: F13993A75599653C

View file

@ -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)