fix(menubar): Add missing not operator

Menu items could not be opened on Linux because Linux allows menu items to be
disabled, and the logic for determining if a menu item should be enabled was
accidentally negated during coffescript conversions.
This commit is contained in:
Halla Moore 2016-11-01 09:57:45 -07:00
parent b8ed562d19
commit 85d1f94637

View file

@ -69,7 +69,7 @@ export default class MenuManager {
item.enabled = NylasEnv.commands.listenerCountForCommand(item.command) > 0;
}
if (item.submenu != null) {
item.enabled = item.submenu.every((subitem) => subitem.enabled === false);
item.enabled = !item.submenu.every((subitem) => subitem.enabled === false);
}
});
return this.sendToBrowserProcess(this.template, NylasEnv.keymaps.getBindingsForAllCommands());