mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-06 13:03:10 +08:00
Prevent identity token from briefly being null while retriving new value
This commit is contained in:
parent
2af2e1982b
commit
7e81c3154e
1 changed files with 3 additions and 2 deletions
|
@ -96,8 +96,9 @@ class IdentityStore extends MailspringStore {
|
|||
* cache and set the token from the keychain.
|
||||
*/
|
||||
_onIdentityChanged = async () => {
|
||||
this._identity = AppEnv.config.get('identity') || {};
|
||||
this._identity.token = await KeyManager.getPassword(KEYCHAIN_NAME);
|
||||
const next = Object.assign({}, AppEnv.config.get('identity') || {});
|
||||
next.token = await KeyManager.getPassword(KEYCHAIN_NAME);
|
||||
this._identity = next;
|
||||
this.trigger();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue