mirror of
https://github.com/HackPlan/atom-shell.git
synced 2026-03-29 08:39:03 +08:00
Make sure all MenuItem's options have a default value.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user