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(); }