Fix next/current challenge routes

prevent bad id's from throwing
This commit is contained in:
Berkeley Martinez
2016-02-14 17:10:26 -08:00
parent 85f04ce707
commit b2acb682ef
2 changed files with 31 additions and 20 deletions

View File

@@ -105,6 +105,7 @@ function buildDisplayChallenges(challengeMap = {}, timezone) {
return finalChallenge;
})
.filter(({ challengeType }) => challengeType !== 6)
.groupBy(getChallengeGroup)
.flatMap(group$ => {
return group$.toArray().map(challenges => ({