base-store clean up

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-27 15:00:47 +03:00
1 parent b79a3c8da3
commit 153e705822
1 file changed
+2 -6
+2 -6
View File
@@ -56,14 +56,10 @@ export class BaseStore<T = any> extends Singleton {
...confOptions,
projectName: "lens",
projectVersion: getAppVersion(),
get cwd() {
return (app || remote.app).getPath("userData"); // todo: remove usage of remote.app (deprecated)
},
cwd: (app || remote.app).getPath("userData"),
});
const storedModel = Object.assign({}, this.storeConfig.store);
Reflect.deleteProperty(storedModel, "__internal__"); // todo: avoid "external-internals"
logger.info(`[STORE]: LOADED from ${this.storeConfig.path}`);
this.fromStore(storedModel);
this.fromStore(this.storeConfig.store);
this.isLoaded = true;
}