Skip to content

Commit

Permalink
Merge pull request #1061 from sgratch/fix-npe-for-conditions-null
Browse files Browse the repository at this point in the history
🐞 Avoid exception in PlanPageHeadings if plan conditions are not loaded
  • Loading branch information
yaacov authored Apr 4, 2024
2 parents 2ddd760 + 962f2b9 commit fcf4a8e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const PlanPageHeadings: React.FC<{ name: string; namespace: string }> = (
const criticalCondition =
loaded &&
!error &&
plan?.status?.conditions.find((condition) => condition?.category === 'Critical');
plan?.status?.conditions?.find((condition) => condition?.category === 'Critical');

if (criticalCondition) {
alerts.push(
Expand Down

0 comments on commit fcf4a8e

Please sign in to comment.