From f81448bfe87f9ca90c7726d2825cc60575ac10aa Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Wed, 21 Jan 2026 02:57:01 +0700 Subject: [PATCH] fix(challenge-helper-scripts): add stub module intro when creating a new module (#65366) --- .../challenge-helper-scripts/create-language-block.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/challenge-helper-scripts/create-language-block.ts b/tools/challenge-helper-scripts/create-language-block.ts index 1d8f4e67e27..dfe8b52b6dc 100644 --- a/tools/challenge-helper-scripts/create-language-block.ts +++ b/tools/challenge-helper-scripts/create-language-block.ts @@ -47,6 +47,7 @@ type SuperBlockInfo = { blocks: Record; chapters?: Record; modules?: Record; + 'module-intros'?: Record; }; type IntroJson = Record; @@ -192,6 +193,16 @@ async function updateIntroJson({ if (!newIntro[superBlock].modules[module]) { newIntro[superBlock].modules[module] = moduleTitle; } + + if (!newIntro[superBlock]['module-intros']) { + newIntro[superBlock]['module-intros'] = {}; + } + if (!newIntro[superBlock]['module-intros'][module]) { + newIntro[superBlock]['module-intros'][module] = { + note: '', + intro: [''] + }; + } } void withTrace(