Skip to content

Commit ed959b3

Browse files
committed
frontend: resource map: simplify RWX PVC cloning
1 parent f9104c6 commit ed959b3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

frontend/src/components/resourceMap/graph/graphGrouping.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ const getConnectedComponents = (nodes: GraphNode[], edges: GraphEdge[]): GraphNo
174174

175175
baseComponents.forEach(component => {
176176
const componentNodeIds = new Set(component.nodes?.map(n => n.id) ?? []);
177-
if (componentNodeIds.size === 0) {
178-
return;
179-
}
180177

181178
sharedRWXPVCNodeIds.forEach(pvcId => {
182179
const pvcNode = sharedRWXPVCById.get(pvcId);
@@ -195,10 +192,8 @@ const getConnectedComponents = (nodes: GraphNode[], edges: GraphEdge[]): GraphNo
195192
}
196193

197194
const pvcCloneId = `${pvcId}--${component.id}`;
198-
if (!componentNodeIds.has(pvcCloneId)) {
199-
component.nodes = [...(component.nodes ?? []), { ...pvcNode, id: pvcCloneId }];
200-
componentNodeIds.add(pvcCloneId);
201-
}
195+
component.nodes = [...(component.nodes ?? []), { ...pvcNode, id: pvcCloneId }];
196+
componentNodeIds.add(pvcCloneId);
202197

203198
component.edges = [
204199
...(component.edges ?? []),

0 commit comments

Comments
 (0)