Skip to content

Commit f828a97

Browse files
committed
Update of community stats calculation
A part of fix for topcoder-platform/community-app#1137
1 parent b1549ce commit f828a97

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/actions/stats.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ async function getCommunityStatsDone(community, uuid, challenges, token) {
4747
const filterFunction = Filter.getFilterFunction(community.challengeFilter);
4848
filtered = filtered.filter(filterFunction);
4949
}
50-
const totalPrize = filtered.reduce(
51-
(total, challenge) => total + (challenge.totalPrize || 0),
52-
0,
50+
const totalPrize = Math.round(
51+
filtered.reduce(
52+
(total, challenge) => total + (challenge.totalPrize || 0),
53+
0,
54+
),
5355
);
5456
const groupService = getGroupService(token);
5557
const result = {

0 commit comments

Comments
 (0)