mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor(client): stop passing around unused data (#57432)
This commit is contained in:
committed by
GitHub
parent
245b486f63
commit
3c48b8dd3f
@@ -304,6 +304,9 @@ function generateChallengeCreator(lang, englishPath, i18nPath) {
|
||||
({ id }) => id === challenge.id
|
||||
);
|
||||
|
||||
const isLastChallengeInBlock =
|
||||
meta.challengeOrder.length - 1 === challengeOrder;
|
||||
|
||||
const isObjectIdFilename = /\/[a-z0-9]{24}\.md$/.test(englishPath);
|
||||
if (isObjectIdFilename) {
|
||||
const filename = englishPath.split('/').pop();
|
||||
@@ -348,6 +351,7 @@ function generateChallengeCreator(lang, englishPath, i18nPath) {
|
||||
challenge.certification = hasDupe ? hasDupe.certification : meta.superBlock;
|
||||
challenge.superBlock = meta.superBlock;
|
||||
challenge.challengeOrder = challengeOrder;
|
||||
challenge.isLastChallengeInBlock = isLastChallengeInBlock;
|
||||
challenge.isPrivate = challenge.isPrivate || meta.isPrivate;
|
||||
challenge.required = (meta.required || []).concat(challenge.required || []);
|
||||
challenge.template = meta.template;
|
||||
|
||||
Reference in New Issue
Block a user