fix(map): Render superBlock titles on initial render

This commit is contained in:
Stuart Taylor
2017-12-27 10:56:30 +00:00
parent f792a4380a
commit 7d7e559b08

View File

@ -209,6 +209,7 @@ export function getChallenge(
) { ) {
return map return map
.flatMap(({ entities, result: { superBlocks } }) => { .flatMap(({ entities, result: { superBlocks } }) => {
const superBlock = entities.superBlock;
const block = entities.block[blockDashedName]; const block = entities.block[blockDashedName];
const challenge = entities.challenge[challengeDashedName]; const challenge = entities.challenge[challengeDashedName];
return Observable.if( return Observable.if(
@ -226,6 +227,7 @@ export function getChallenge(
`/challenges/${block.dashedName}/${challenge.dashedName}` : `/challenges/${block.dashedName}/${challenge.dashedName}` :
false, false,
entities: { entities: {
superBlock,
challenge: { challenge: {
[challenge.dashedName]: mapChallengeToLang(challenge, lang) [challenge.dashedName]: mapChallengeToLang(challenge, lang)
} }