From ee2c6965779e9794044b5ffb49c906de48def6cd Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 14 Aug 2013 21:59:49 +0800 Subject: [PATCH] Make sure all MenuItem's options have a default value. --- browser/api/lib/menu-item.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/browser/api/lib/menu-item.coffee b/browser/api/lib/menu-item.coffee index aeae1f5..9c21ebf 100644 --- a/browser/api/lib/menu-item.coffee +++ b/browser/api/lib/menu-item.coffee @@ -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 -- 2.7.4