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:
@@ -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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user