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

revering user-store refactoring

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-08-12 15:24:28 +03:00
parent 51312a8ddd
commit 67ef29372c

View File

@ -71,12 +71,10 @@ export class UserStore extends BaseStore<UserStoreModel> {
if (kubeConfig) { if (kubeConfig) {
this.newContexts.clear(); this.newContexts.clear();
const localContexts = loadConfig(kubeConfig).getContexts(); const localContexts = loadConfig(kubeConfig).getContexts();
localContexts.forEach(({ cluster, name }) => { localContexts
if (!cluster) return; .filter(ctx => ctx.cluster)
if (!this.seenContexts.has(name)) { .filter(ctx => !this.seenContexts.has(ctx.name))
this.newContexts.add(name) .forEach(ctx => this.newContexts.add(ctx.name));
}
})
} }
} }