mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 03:29:46 +08:00
fix(accounts): Load accounts before adding a new one
This commit is contained in:
parent
cc2537b141
commit
84a0125260
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ class AccountStore
|
|||
console.log JSON.stringify(json)
|
||||
throw new Error("Returned account data is invalid")
|
||||
return if @_tokens[json.id]
|
||||
@_load()
|
||||
@_tokens[json.id] = json.auth_token
|
||||
@_accounts.push((new Account).fromJSON(json))
|
||||
@_save()
|
||||
|
|
Loading…
Reference in a new issue