We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c03871 commit 41caeb5Copy full SHA for 41caeb5
ui/src/services/k8s/Metalk8sLocalVolumeProvider.ts
@@ -85,12 +85,9 @@ export default class Metalk8sLocalVolumeProvider {
85
public detachVolumes = async (
86
localPVs: LocalPersistentVolume[],
87
): Promise<void> => {
88
- const volumeNames = [];
89
- for (const localPV of localPVs) {
90
- // The volume name is the same as the PV name
91
- const volumeName = localPV.metadata.name;
92
- volumeNames.push(volumeName);
93
- }
+ // The volume name is the same as the PV name
+ const volumeNames = localPVs.map((localPV) => localPV.metadata.name);
+
94
for (const volumeName of volumeNames) {
95
try {
96
await this.volumeClient.deleteMetalk8sV1alpha1Volume(volumeName);
0 commit comments