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: => _toggleDropdown: =>
@setState showing: !@state.showing @setState showing: !@state.showing
_makeMenuItem: (item, idx = 0) => _makeMenuItem: (item, idx) =>
menuItem = { menuItem = {
label: item.label, label: item.label,
click: @_onSwitchAccount.bind(@, item) click: @_onSwitchAccount.bind(@, item)
@ -64,11 +64,11 @@ class AccountSwitcher extends React.Component
if @props.accounts.length > 1 if @props.accounts.length > 1
unifiedItem = @_makeUnifiedItem() unifiedItem = @_makeUnifiedItem()
template = [ template = [
@_makeMenuItem(unifiedItem) @_makeMenuItem(unifiedItem, 1)
{type: 'separator'} {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 [ template = template.concat [
{type: 'separator'} {type: 'separator'}