1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-02 08:33:28 +00:00

[bug] Adjust null checking for window in state

This commit is contained in:
addison
2021-11-16 10:07:02 -05:00
parent 537df46098
commit 71e0bf9857

View File

@@ -1151,8 +1151,8 @@ export class StateService implements StateServiceAbstraction {
}
async getWindow(): Promise<Map<string, any>> {
const globals = await this.getGlobals({ storageLocation: StorageLocation.Disk });
return Object.keys(globals.window).length > 0 ?
const globals = await this.getGlobals(await this.defaultOnDiskOptions());
return globals?.window != null && Object.keys(globals.window).length > 0 ?
globals.window :
new Map<string, any>();
}