aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/components/measure/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/components/measure/utils.ts')
-rw-r--r--server/sonar-web/src/main/js/components/measure/utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/components/measure/utils.ts b/server/sonar-web/src/main/js/components/measure/utils.ts
index e45496fbd1a..e5851a5f956 100644
--- a/server/sonar-web/src/main/js/components/measure/utils.ts
+++ b/server/sonar-web/src/main/js/components/measure/utils.ts
@@ -19,6 +19,7 @@
*/
import { getRatingTooltip as nextGetRatingTooltip, isDiffMetric } from '../../helpers/measures';
import { Metric, Measure, MeasureEnhanced } from '../../app/types';
+import { getLeakPeriod } from '../../helpers/periods';
const KNOWN_RATINGS = ['sqale_rating', 'reliability_rating', 'security_rating'];
@@ -37,7 +38,7 @@ export function getLeakValue(measure: Measure | undefined): string | undefined {
if (!measure || !measure.periods) {
return undefined;
}
- const period = measure.periods.find(period => period.index === 1);
+ const period = getLeakPeriod(measure.periods);
return period && period.value;
}