From 71e0bf9857b616cc2164e3bbd2571d9442f1f45a Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Nov 2021 10:07:02 -0500 Subject: [PATCH] [bug] Adjust null checking for window in state --- common/src/services/state.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 93200fc5..e29fb448 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1151,8 +1151,8 @@ export class StateService implements StateServiceAbstraction { } async getWindow(): Promise> { - 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(); }