aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
diff options
context:
space:
mode:
authorAmbroise C <ambroise.christea@sonarsource.com>2023-09-13 17:24:05 +0200
committersonartech <sonartech@sonarsource.com>2023-09-13 20:02:56 +0000
commit51c3da2b324930e5ebaf5ea6e7213ba6b31b885b (patch)
tree1a07ded5e4f2b7f6c1c0a91f9de8904e8e4014e0 /server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
parentf055071dede97c2195bc93f82b8e5e59abde899d (diff)
downloadsonarqube-51c3da2b324930e5ebaf5ea6e7213ba6b31b885b.tar.gz
sonarqube-51c3da2b324930e5ebaf5ea6e7213ba6b31b885b.zip
SONAR-20327 Fix code smells following prettier upgrades
Co-authored-by: David Cho-Lerat <david.cho-lerat@sonarsource.com>
Diffstat (limited to 'server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx')
-rw-r--r--server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
index d584a8d94c0..ed21ba444d9 100644
--- a/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
+++ b/server/sonar-web/src/main/js/apps/quality-gates/components/ConditionReviewAndUpdateModal.tsx
@@ -86,12 +86,12 @@ export default class CaycReviewUpdateConditionsModal extends React.PureComponent
const { weakConditions, missingConditions } = getWeakMissingAndNonCaycConditions(conditions);
const sortedWeakConditions = sortBy(
weakConditions,
- (condition) => metrics[condition.metric] && metrics[condition.metric].name,
+ (condition) => metrics[condition.metric]?.name,
);
const sortedMissingConditions = sortBy(
missingConditions,
- (condition) => metrics[condition.metric] && metrics[condition.metric].name,
+ (condition) => metrics[condition.metric]?.name,
);
return (