Skip to content

Commit

Permalink
fix(FE): Do not change clusters order
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewinci committed Sep 24, 2022
1 parent bbaecd8 commit a29366c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/clusters/edit-clusters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export const EditCluster = () => {
notifyAlert("Cluster configuration not found", `Unable to update ${cluster.name}.`);
return Promise.reject();
} else {
const clusters = appState.clusters.filter((c) => c.id != clusterId);
clusters.push(cluster);
const clusters = appState.clusters.map((c) => (c.id != clusterId ? c : cluster));
return setAppState({ ...appState, clusters });
}
};
Expand Down

0 comments on commit a29366c

Please sign in to comment.