Skip to content

Commit 2ea6b19

Browse files
committed
refactor: strip the v1 _rate suffix with the same anchored pattern
1 parent 7964968 commit 2ea6b19

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/app/src/ChartUtils.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ const mapV1AggFnToV2 = (aggFn?: AggFn): AggFnV2 | undefined => {
11051105
}
11061106
// Map rate-based aggregations to their base aggregation
11071107
if (aggFn.endsWith('_rate')) {
1108-
return mapV1AggFnToV2(aggFn.replace('_rate', '') as AggFn);
1108+
return mapV1AggFnToV2(aggFn.replace(/_rate$/, '') as AggFn);
11091109
}
11101110

11111111
// Map percentiles to quantile

0 commit comments

Comments
 (0)