mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-26 17:15:30 +08:00
fix(identity): Require NylasAPIRequest correctly
This commit is contained in:
parent
5582782ddd
commit
2f8a1d2b6e
1 changed files with 2 additions and 1 deletions
|
@ -189,7 +189,7 @@ class AccountStore extends NylasStore
|
|||
|
||||
refreshHealthOfAccounts: (accountIds) =>
|
||||
NylasAPI ?= require '../nylas-api'
|
||||
NylasAPIRequest ?= require '../nylas-api-request'
|
||||
NylasAPIRequest ?= require('../nylas-api-request').default
|
||||
Promise.all(accountIds.map (accountId) =>
|
||||
return new NylasAPIRequest({
|
||||
api: NylasAPI,
|
||||
|
@ -198,6 +198,7 @@ class AccountStore extends NylasStore
|
|||
accountId: accountId,
|
||||
},
|
||||
}).run().then (json) =>
|
||||
return unless json
|
||||
existing = @accountForId(accountId)
|
||||
return unless existing # user may have deleted
|
||||
existing.fromJSON(json)
|
||||
|
|
Loading…
Reference in a new issue