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:
parent
51312a8ddd
commit
67ef29372c
@ -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));
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user