mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-25 16:44:16 +08:00
fix(api): Don't display auth failure bar for req with no auth (onboarding)
This commit is contained in:
parent
12b1609206
commit
c5d9611f24
1 changed files with 3 additions and 0 deletions
|
@ -231,6 +231,9 @@ class NylasAPI
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
|
|
||||||
_handleAuthenticationFailure: (modelUrl, apiToken) ->
|
_handleAuthenticationFailure: (modelUrl, apiToken) ->
|
||||||
|
# prevent /auth errors from presenting auth failure notices
|
||||||
|
return Promise.resolve() unless apiToken
|
||||||
|
|
||||||
AccountStore ?= require './stores/account-store'
|
AccountStore ?= require './stores/account-store'
|
||||||
account = AccountStore.accounts().find (account) ->
|
account = AccountStore.accounts().find (account) ->
|
||||||
AccountStore.tokenForAccountId(account.id) is apiToken
|
AccountStore.tokenForAccountId(account.id) is apiToken
|
||||||
|
|
Loading…
Reference in a new issue