1
0
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:
Sebastian Malton 2020-09-01 14:33:47 -04:00
parent 304ab28224
commit 85a7f1e323

View File

@ -1,4 +1,4 @@
import type { WorkspaceId } from "./workspace-store";
import { WorkspaceId, workspaceStore } from "./workspace-store";
import path from "path";
import { app, ipcRenderer, remote } from "electron";
import { unlink } from "fs-extra";
@ -120,6 +120,9 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
}
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));
}