Browse Source

Make commandId a read only property

Kevin Sawicki 8 years ago
parent
commit
ad110fc806
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/browser/api/menu-item.js

+ 1 - 1
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) => {