1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-23 03:33:29 +00:00

[bug] Remove uneeded clearing of access token

This commit is contained in:
addison
2021-11-16 15:53:36 -05:00
parent 6754b6ceeb
commit a74cebf73e

View File

@@ -52,12 +52,6 @@ export class StateService implements StateServiceAbstraction {
async loadStateFromDisk() { async loadStateFromDisk() {
if (await this.getActiveUserIdFromStorage() != null) { if (await this.getActiveUserIdFromStorage() != null) {
const diskState = await this.storageService.get<State>('state', await this.defaultOnDiskOptions()); const diskState = await this.storageService.get<State>('state', await this.defaultOnDiskOptions());
for (const userId in diskState?.accounts) {
if (userId == null) {
continue;
}
diskState.accounts[userId].accessToken = null;
}
this.state = diskState; this.state = diskState;
await this.storageService.save('state', diskState, await this.defaultOnDiskMemoryOptions()); await this.storageService.save('state', diskState, await this.defaultOnDiskMemoryOptions());
} }