]> khamidou — GitHub mirrors - electron.git/commitdiff
Make sure all MenuItem's options have a default value.
authorCheng Zhao <zcbenz@gmail.com>
Wed, 14 Aug 2013 13:59:49 +0000 (21:59 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 14 Aug 2013 13:59:49 +0000 (21:59 +0800)
browser/api/lib/menu-item.coffee

index aeae1f57620a8c202204afbffad160bdece2a05c..9c21ebf3a0b4c3f365b4dab329d6ce0417cb197e 100644 (file)
@@ -14,8 +14,12 @@ class MenuItem
     @type = @type ? 'normal'
     @label = @label ? ''
     @sublabel = @sublabel ? ''
+    @accelerator = @accelerator ? null
     @enabled = @enabled ? true
     @visible = @visible ? true
+    @checked = @checked ? false
+    @groupId = @groupId ? null
+    @submenu = @submenu ? null
 
     throw new Error('Unknown menu type') if MenuItem.types.indexOf(@type) is -1