Make sure all MenuItem's options have a default value.

This commit is contained in:
Cheng Zhao 2013-08-14 21:59:49 +08:00
parent 2fd91e8c96
commit ee2c696577

View 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