fix(profile): Fix challenges of undefined Error

This commit is contained in:
Stuart Taylor
2018-02-27 14:29:37 +00:00
parent 6cf3fb6049
commit b81cea4b08
3 changed files with 18 additions and 7 deletions

View File

@@ -110,14 +110,14 @@ export function projectsSelector(state) {
key.includes('projects') && !key.includes('coding-interview')
)
.map(key => blocks[key])
.map(({ name, challenges, superBlock }) => {
.map(({ title, challenges, superBlock }) => {
const projectChallengeDashNames = challenges
// remove any project intros
.filter(chal => !chal.includes('get-set-for'));
const projectChallenges = projectChallengeDashNames
.map(dashedName => selectiveChallengeTitleSelector(state, dashedName));
return {
projectBlockName: name,
projectBlockName: title,
superBlock,
challenges: projectChallenges,
challengeNameIdMap: pick(