From 4e5c5177c88d28f509a0936db32b58cfa717966b Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 6 Jul 2021 10:21:12 -0400 Subject: [PATCH] Remove nested block Signed-off-by: Sebastian Malton --- src/common/base-store.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/common/base-store.ts b/src/common/base-store.ts index cd95d7003b..00f134b7db 100644 --- a/src/common/base-store.ts +++ b/src/common/base-store.ts @@ -58,13 +58,12 @@ export abstract class BaseStore extends Singleton { logger.info(`[STORE]: LOADED from ${this.path}`); - { - const res: any = this.fromStore(this.storeConfig.store); + const res: any = this.fromStore(this.storeConfig.store); - if (res instanceof Promise || (typeof res === "object" && res && typeof res.then === "function")) { - console.error(`${this.name} extends BaseStore's fromStore method returns a Promise or promise-like object. This is an error and must be fixed.`); - } + if (res instanceof Promise || (typeof res === "object" && res && typeof res.then === "function")) { + console.error(`${this.name} extends BaseStore's fromStore method returns a Promise or promise-like object. This is an error and must be fixed.`); } + this.enableSync(); }