1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

base-store clean up

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-07-27 15:00:47 +03:00
parent b79a3c8da3
commit 153e705822

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