Skip to content

Commit

Permalink
Hotfixing bug in exercise config form validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
krulis-martin committed Mar 28, 2022
1 parent 952f9fc commit c77289c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const validate = (formData, { exercise, supplementaryFiles }) => {
/>
);

if (test['entry-point'][envId]) {
if (test['entry-point'] && test['entry-point'][envId]) {
const extraFilesIndex = createFilesNamesIndex(test['extra-files'][envId]);
validateFileExists(formData, errors, ['config', testKey, 'entry-point', envId], extraFilesIndex);
}
Expand Down Expand Up @@ -434,7 +434,7 @@ const warn = formData => {
);

// check ambiguity of entry points and mark them in envEntryPointDefaults
for (const envId in test['entry-point']) {
for (const envId in test['entry-point'] || {}) {
const entryPoint = test['entry-point'][envId];
envEntryPointDefaults[envId] = warnEntryPointStateFunction(envEntryPointDefaults[envId], entryPoint === '');
}
Expand Down

0 comments on commit c77289c

Please sign in to comment.