fix(account-store): Allow updateAccount in all windows

This commit is contained in:
Ben Gotow 2016-04-12 11:48:16 -07:00
parent be3b795811
commit 6d01120558

View file

@ -80,10 +80,9 @@ class AccountStore extends NylasStore
# Inbound Events
_onUpdateAccount: (id, updated) =>
return unless NylasEnv.isMainWindow()
idx = _.findIndex @_accounts, (a) -> a.id is id
account = @_accounts[idx]
return if !account or _.isEqual(account, updated)
return unless account
account = _.extend(account, updated)
@_caches = {}
@_accounts[idx] = account