From 881bb3cb4943af916f62a7741ca2a1dac3e32d85 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Fri, 11 Feb 2022 15:34:36 -0500 Subject: [PATCH] Update jslib (#1327) * Update jslib * Add a null check * Reworked condition * Ran prettier --- jslib | 2 +- src/app/app.component.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/jslib b/jslib index 3a1b5bf9a0..bcbb52e6ec 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 3a1b5bf9a0fcea7f8fd46d480eb0468cc0ee77c9 +Subproject commit bcbb52e6ec007b9bafd09fab5253bd3f015e694f diff --git a/src/app/app.component.ts b/src/app/app.component.ts index a0315f419a..90dfd914b3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -582,11 +582,14 @@ export class AppComponent implements OnInit { } private async reloadProcess(): Promise { - const accounts = Object.keys(this.stateService.accounts.getValue()); - if (accounts.length > 0) { - for (const userId of accounts) { - if (!(await this.vaultTimeoutService.isLocked(userId))) { - return; + const accounts = this.stateService.accounts.getValue(); + if (accounts != null) { + const keys = Object.keys(accounts); + if (keys.length > 0) { + for (const userId of keys) { + if (!(await this.vaultTimeoutService.isLocked(userId))) { + return; + } } } }