fix(account-switcher): Don't display "All Accounts" when only 1 account

This commit is contained in:
Juan Tejada 2016-01-28 19:52:11 -08:00
parent 4b68f47040
commit be73b8bea8

View file

@ -139,7 +139,10 @@ class AccountSwitcher extends React.Component
classnames = ""
classnames += "open" if @state.showing
selected = @_selectedItem()
items = [@_makeItem()].concat @props.accounts.map(@_makeItem)
if @props.accounts.length is 1
items = @props.accounts.map(@_makeItem)
else
items = [@_makeItem()].concat @props.accounts.map(@_makeItem)
<div id="account-switcher"
tabIndex={-1}