From f49f7d65a5af80048b2c9512b3374c477a67dfc3 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Tue, 26 Sep 2017 14:38:34 -0400 Subject: [PATCH] remove check on items instance --- lib/browser/api/menu.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/browser/api/menu.js b/lib/browser/api/menu.js index a060ec8836..cd3dcc65b5 100644 --- a/lib/browser/api/menu.js +++ b/lib/browser/api/menu.js @@ -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++) {