mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-09 09:38:07 +08:00
fix(sentry-2518): Better debugging information for when token is not found
This commit is contained in:
parent
27181d177e
commit
2c6e3c4db5
1 changed files with 6 additions and 2 deletions
|
@ -107,10 +107,14 @@ class PreferencesAccounts extends React.Component
|
|||
return [] unless @props.config
|
||||
|
||||
tokens = @props.config.get('tokens') || []
|
||||
token = _.find tokens, (token) ->
|
||||
token.provider is 'nylas' and token.identifier is account.emailAddress
|
||||
token = _.find tokens, (t) ->
|
||||
t.provider is 'nylas' and t.identifier is account.emailAddress
|
||||
tokens = _.without(tokens, token)
|
||||
|
||||
if not token
|
||||
console.warn("Could not find nylas token for email address #{account.emailAddress}")
|
||||
return
|
||||
|
||||
DatabaseStore.unpersistModel(account).then =>
|
||||
# TODO: Delete other mail data
|
||||
EdgehillAPI.unlinkToken(token)
|
||||
|
|
Loading…
Reference in a new issue