Skip to content

Commit

Permalink
Adds optional chaining for label selector in topology view
Browse files Browse the repository at this point in the history
Removes dependency on app label

Signed-off-by: Bipul Adhikari <[email protected]>
  • Loading branch information
bipuladh committed Sep 9, 2024
1 parent 376ebbf commit 851d37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/odf/components/topology/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const generateNodeDeploymentsMap = (
const podsInNode = pods.filter(
(pod) =>
pod.spec.nodeName === getName(node) &&
allNames.includes(pod.metadata.labels['app'])
allNames.includes(pod.metadata.labels?.['app'])
);
const deploymentsInNode = podsInNode
.filter((pod) => _.has(pod, 'metadata.ownerReferences'))
Expand Down

0 comments on commit 851d37a

Please sign in to comment.