diff --git a/lib/browser/api/menu-item.js b/lib/browser/api/menu-item.js index e1ccda4886..264be81790 100644 --- a/lib/browser/api/menu-item.js +++ b/lib/browser/api/menu-item.js @@ -72,7 +72,7 @@ const MenuItem = function (options) { throw new Error(`Unknown menu item type: ${this.type}`) } - this.commandId = ++nextCommandId + this.overrideReadOnlyProperty('commandId', ++nextCommandId) const click = options.click this.click = (event, focusedWindow) => {