From ba7d7f1028e43f635ab36783b75288b5952b9b0d Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Nov 2021 12:42:18 -0500 Subject: [PATCH] [bug] Create a State if one is requested from memory before it exists --- common/src/services/state.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/services/state.service.ts b/common/src/services/state.service.ts index 05e02b8a..c663f12d 100644 --- a/common/src/services/state.service.ts +++ b/common/src/services/state.service.ts @@ -1274,7 +1274,7 @@ export class StateService implements StateServiceAbstraction { this.secureStorageService : this.storageService; - const state = await storageLocation.get('state', options); + const state = await storageLocation.get('state', options) ?? new State(); state.accounts[account.userId] = account; await storageLocation.save('state', state, options);