mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-27 10:00:40 -04:00
fix(scripts): ignore upcoming blocks when building external curricula (#61345)
This commit is contained in:
@@ -305,13 +305,17 @@ export function buildExtCurriculumDataV2(
|
||||
moduleType: module.moduleType,
|
||||
blocks: module.comingSoon
|
||||
? []
|
||||
: module.blocks.map(block => {
|
||||
const blockData = blocksWithData[block.dashedName];
|
||||
return {
|
||||
intro: superBlockIntros.blocks[block.dashedName].intro,
|
||||
meta: blockData.meta
|
||||
};
|
||||
})
|
||||
: module.blocks
|
||||
// Upcoming blocks aren't included in blocksWithData
|
||||
// and thus they have no metadata and need to be filtered out.
|
||||
.filter(block => blocksWithData[block.dashedName])
|
||||
.map(block => {
|
||||
const blockData = blocksWithData[block.dashedName];
|
||||
return {
|
||||
intro: superBlockIntros.blocks[block.dashedName].intro,
|
||||
meta: blockData.meta
|
||||
};
|
||||
})
|
||||
}))
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user