From 2b6ed11828ff9f85233134440d6221e436c2ca20 Mon Sep 17 00:00:00 2001 From: Juan Tejada Date: Fri, 5 Feb 2016 09:55:27 -0800 Subject: [PATCH] fix(sidebar): Display correct keyboard shortcuts in account switcher - Fixes #1203 --- .../account-sidebar/lib/components/account-switcher.cjsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal_packages/account-sidebar/lib/components/account-switcher.cjsx b/internal_packages/account-sidebar/lib/components/account-switcher.cjsx index ed561482f..21e113452 100644 --- a/internal_packages/account-sidebar/lib/components/account-switcher.cjsx +++ b/internal_packages/account-sidebar/lib/components/account-switcher.cjsx @@ -44,7 +44,7 @@ class AccountSwitcher extends React.Component _toggleDropdown: => @setState showing: !@state.showing - _makeMenuItem: (item, idx = 0) => + _makeMenuItem: (item, idx) => menuItem = { label: item.label, click: @_onSwitchAccount.bind(@, item) @@ -64,11 +64,11 @@ class AccountSwitcher extends React.Component if @props.accounts.length > 1 unifiedItem = @_makeUnifiedItem() template = [ - @_makeMenuItem(unifiedItem) + @_makeMenuItem(unifiedItem, 1) {type: 'separator'} ] - items.forEach (item, idx) => template.push(@_makeMenuItem(item, idx + 1)) + items.forEach (item, idx) => template.push(@_makeMenuItem(item, idx + 2)) template = template.concat [ {type: 'separator'}