Skip to content

Commit b00aa20

Browse files
Merge pull request #2937 from devtron-labs/fix/app-details-null-check
fix: handle potential null value in materials check and improve node health status check
2 parents c7ecdd4 + 9e36adb commit b00aa20

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/app/details/appDetails/DeployedCommitCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const DeployedCommitCard = ({ cardLoading, showCommitInfoDrawer, envId, ciArtifa
4040
return <LoadingCard />
4141
}
4242

43-
if (materials.length === 0 || !materials[0].history[0]?.commit?.slice(0, 7)) {
43+
if (!materials?.length || !materials[0].history[0]?.commit?.slice(0, 7)) {
4444
return null
4545
}
4646

src/components/v2/appDetails/k8Resource/nodeType/Node.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const NodeComponent = ({
159159
let _healthyNodeCount = 0
160160

161161
_selectedNodes.forEach((node: Node) => {
162-
if (node.health?.status.toLowerCase() === 'healthy') {
162+
if (node.health?.status?.toLowerCase() === 'healthy') {
163163
_healthyNodeCount += 1
164164
}
165165
})

0 commit comments

Comments
 (0)