mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix initial value not being saved
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
parent
304ab28224
commit
85a7f1e323
@ -1,4 +1,4 @@
|
|||||||
import type { WorkspaceId } from "./workspace-store";
|
import { WorkspaceId, workspaceStore } from "./workspace-store";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { app, ipcRenderer, remote } from "electron";
|
import { app, ipcRenderer, remote } from "electron";
|
||||||
import { unlink } from "fs-extra";
|
import { unlink } from "fs-extra";
|
||||||
@ -120,6 +120,9 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getByWorkspaceId(workspaceId: string): Cluster[] {
|
getByWorkspaceId(workspaceId: string): Cluster[] {
|
||||||
|
this.clusterOrders[workspaceId] ??= Array.from(this.clusters.values())
|
||||||
|
.filter(cluster => cluster.workspace === workspaceId)
|
||||||
|
.map(cluster => cluster.id);
|
||||||
return this.clusterOrders[workspaceId].map(clusterId => this.clusters.get(clusterId));
|
return this.clusterOrders[workspaceId].map(clusterId => this.clusters.get(clusterId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user