]> source.dussan.org Git - sonarqube.git/commitdiff
[NO-JIRA] Fix unnecessary assertion
authorDavid Cho-Lerat <david.cho-lerat@sonarsource.com>
Mon, 23 Oct 2023 08:05:55 +0000 (10:05 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 23 Oct 2023 20:02:42 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/overview/components/SonarLintPromotion.tsx

index f411e716812bbc05a90fb0e42081bb5b19bad9ec..92ac6bfb1be870be8a8945be492864f0d58ee1b4 100644 (file)
@@ -50,7 +50,7 @@ const CONDITIONS_TO_SHOW = [
 export function SonarLintPromotion({ currentUser, qgConditions }: SonarLintPromotionProps) {
   const showMessage = qgConditions?.some(
     (qgCondition) =>
-      CONDITIONS_TO_SHOW.includes(qgCondition.metric as MetricKey) && qgCondition.level === 'ERROR',
+      CONDITIONS_TO_SHOW.includes(qgCondition.metric) && qgCondition.level === 'ERROR',
   );
   if (!showMessage || currentUser.usingSonarLintConnectedMode) {
     return null;