From b16993b9153b2558304c0fcb72c7d5052bbdc901 Mon Sep 17 00:00:00 2001 From: Stuart Taylor Date: Tue, 19 Dec 2017 00:07:53 +0000 Subject: [PATCH] fix(backend): Unable to submit backend project --- common/app/routes/Challenges/utils/build.js | 2 +- common/app/routes/Challenges/utils/frame.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/app/routes/Challenges/utils/build.js b/common/app/routes/Challenges/utils/build.js index aff251e5f9..f82785c37e 100644 --- a/common/app/routes/Challenges/utils/build.js +++ b/common/app/routes/Challenges/utils/build.js @@ -60,7 +60,7 @@ export function buildBackendChallenge(state) { ) .map(([ frameRunner, jQuery ]) => ({ build: jQuery + frameRunner, - source: { url }, + sources: { url }, checkChallengePayload: { solution: url } })); } diff --git a/common/app/routes/Challenges/utils/frame.js b/common/app/routes/Challenges/utils/frame.js index 8ae321b7ea..9a438baa8f 100644 --- a/common/app/routes/Challenges/utils/frame.js +++ b/common/app/routes/Challenges/utils/frame.js @@ -100,7 +100,7 @@ const writeTestDepsToDocument = frameReady => ctx => { }; // default for classic challenges // should not be used for modern - tests.__source = sources['index'] || ''; + tests.__source = (sources && 'index' in sources) ? sources['index'] : ''; // provide the file name and get the original source tests.__getUserInput = fileName => _.toString(sources[fileName]); tests.__checkChallengePayload = checkChallengePayload;