feat: remove protection from interview prep (#38136)

The interview prep section includes many challenges that require long
running calculations which can be mistaken for infinite loops. This
removes the loop protection from those challenges, while the tests are
being evaluated.

It keeps the protection for the preview, since it is easy to create
broken code while working on a challenge and that should not crash the
site.
This commit is contained in:
Oliver Eyton-Williams
2020-02-04 06:03:56 +01:00
committed by GitHub
parent 8b692560e8
commit c6eb40ceef
5 changed files with 53 additions and 30 deletions

View File

@ -61,6 +61,7 @@ const getIntroIfRequired = (node, index, nodeArray) => {
exports.createChallengePages = createPage => ({ node }, index, thisArray) => {
const {
superBlock,
block,
fields: { slug },
required = [],
@ -77,6 +78,7 @@ exports.createChallengePages = createPage => ({ node }, index, thisArray) => {
component: getTemplateComponent(challengeType),
context: {
challengeMeta: {
superBlock,
block: block,
introPath: getIntroIfRequired(node, index, thisArray),
template,