mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-21 21:11:35 +01:00
prevent duplicate cache deletes in browser
This commit is contained in:
parent
301028f8db
commit
e66ae53bf9
@ -167,4 +167,17 @@ export class BrowserStateService
|
||||
this.reconcileOptions(options, await this.defaultInMemoryOptions())
|
||||
);
|
||||
}
|
||||
|
||||
// Overriding the base class to prevent deleting the cache on save. We register a storage listener
|
||||
// to delete the cache in the constructor above.
|
||||
protected override async saveAccountToDisk(
|
||||
account: Account,
|
||||
options: StorageOptions
|
||||
): Promise<void> {
|
||||
const storageLocation = options.useSecureStorage
|
||||
? this.secureStorageService
|
||||
: this.storageService;
|
||||
|
||||
await storageLocation.save(`${options.userId}`, account, options);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user