fix(tools): fix insert-erms helper script (#42903)

* fix(tools): fix insert-erms helper script

* only throw if undefined erms

* revert last two commits

* fix insertErms the correct way
pull/42961/head
Shaun Hamilton 2021-07-21 17:14:22 +01:00 committed by GitHub
parent 32dbe23f5e
commit cefb973c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -27,7 +27,10 @@ function getStepTemplate({
}) {
const seedTexts = Object.values(challengeSeeds)
.map(({ contents, ext, editableRegionBoundaries }) => {
const fullContents = insertErms(contents, editableRegionBoundaries);
let fullContents = contents;
if (editableRegionBoundaries.length >= 2) {
fullContents = insertErms(contents, editableRegionBoundaries);
}
return getCodeBlock(ext, fullContents);
})
.join('\n');