Stop wrapping function for no reason.

This commit is contained in:
picklesrus 2018-03-02 10:58:43 -08:00
parent 1910968b13
commit 026b9dc282

View file

@ -553,9 +553,7 @@ class Runtime extends EventEmitter {
const menuId = this._makeExtensionMenuId(menuName, categoryInfo.id); const menuId = this._makeExtensionMenuId(menuName, categoryInfo.id);
let options = null; let options = null;
if (typeof menuItems === 'function') { if (typeof menuItems === 'function') {
options = function () { options = menuItems;
return menuItems();
};
} else { } else {
options = menuItems.map(item => { options = menuItems.map(item => {
switch (typeof item) { switch (typeof item) {