1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-05 01:53:13 +00:00

[bug] Adjusted state scope of event collection

This commit is contained in:
addison
2021-11-16 12:40:38 -05:00
parent 27ab7f97b5
commit 3d314018fb

View File

@@ -795,12 +795,12 @@ export class StateService implements StateServiceAbstraction {
}
async getEventCollection(options?: StorageOptions): Promise<EventData[]> {
return (await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions)))?.eventCollection;
return (await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions())))?.eventCollection;
}
async setEventCollection(value: EventData[], options?: StorageOptions): Promise<void> {
const account = await this.getAccount(this.reconcileOptions(options, this.defaultInMemoryOptions));
const account = await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()));
account.eventCollection = value;
await this.saveAccount(account, this.reconcileOptions(options, this.defaultInMemoryOptions));
await this.saveAccount(account, this.reconcileOptions(options, await this.defaultOnDiskOptions()));
}
async getEverBeenUnlocked(options?: StorageOptions): Promise<boolean> {