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) {
|
||||
this.newContexts.clear();
|
||||
const localContexts = loadConfig(kubeConfig).getContexts();
|
||||
localContexts.forEach(({ cluster, name }) => {
|
||||
if (!cluster) return;
|
||||
if (!this.seenContexts.has(name)) {
|
||||
this.newContexts.add(name)
|
||||
}
|
||||
})
|
||||
localContexts
|
||||
.filter(ctx => ctx.cluster)
|
||||
.filter(ctx => !this.seenContexts.has(ctx.name))
|
||||
.forEach(ctx => this.newContexts.add(ctx.name));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user