Skip to content

Commit 52af3d2

Browse files
Fix prizeSets logical to get 'placements' instead first one
1 parent 7512db6 commit 52af3d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/challenges.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export function normalizeChallenge(challenge, username) {
9494
if (submissionEndTimestamp) {
9595
submissionEndTimestamp = submissionEndTimestamp.scheduledEndDate;
9696
}
97-
const prizes = (challenge.prizeSets[0] && challenge.prizeSets[0].prizes) || [];
97+
const placementPrizes = _.find(challenge.prizeSets, { type: 'placement' });
98+
const { prizes } = placementPrizes || [];
9899
_.defaults(challenge, {
99100
communities: new Set([COMPETITION_TRACKS[challenge.track]]),
100101
groups,

0 commit comments

Comments
 (0)