Skip to content

Commit

Permalink
Merge pull request #286 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Release 2020/11/24 - Fix prizeSets logical to get 'placements' instead first one
  • Loading branch information
luizrrodrigues authored Nov 24, 2020
2 parents b66d987 + 06d7a2c commit cb4bee8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
"test": "npm run lint && npm run jest"
},
"version": "1.1.2",
"version": "1.1.3",
"dependencies": {
"auth0-js": "^6.8.4",
"config": "^3.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/services/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ export function normalizeChallenge(challenge, username) {
if (submissionEndTimestamp) {
submissionEndTimestamp = submissionEndTimestamp.scheduledEndDate;
}
const prizes = (challenge.prizeSets[0] && challenge.prizeSets[0].prizes) || [];
const placementPrizes = _.find(challenge.prizeSets, { type: 'placement' });
const { prizes } = placementPrizes || [];
_.defaults(challenge, {
communities: new Set([COMPETITION_TRACKS[challenge.track]]),
groups,
Expand Down

0 comments on commit cb4bee8

Please sign in to comment.