Skip to content

Commit

Permalink
Error formatting FormulaWidget AVG values [sc-182582]
Browse files Browse the repository at this point in the history
  • Loading branch information
Clebal committed Sep 29, 2021
1 parent 08d0ce9 commit 61789e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-core/src/operations/aggregation/values.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ export const aggregationFunctions = {
[AggregationTypes.MIN]: (values, key) => min(values, key),
[AggregationTypes.MAX]: (values, key) => max(values, key),
[AggregationTypes.SUM]: (values, key) => sum(values, key),
[AggregationTypes.AVG]: (values, key) => sum(values, key) / values.length
[AggregationTypes.AVG]: (values, key) => sum(values, key) / (values.length || 1)
};

0 comments on commit 61789e1

Please sign in to comment.