fix(sidebar): Display correct keyboard shortcuts in account switcher

- Fixes #1203
This commit is contained in:
Juan Tejada 2016-02-05 09:55:27 -08:00
parent 1afd380118
commit 2b6ed11828

View file

@ -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'}