fix(client): default challengeFiles to array (#49474)

* refactor(client): check challengesfile length in the epic

* change the initial state of challenge files to array
This commit is contained in:
Muhammed Mustafa 2023-02-23 12:18:04 +02:00 committed by GitHub
parent 06fe9b6d16
commit a64e732458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ import {
const { forumLocation } = envData;
function filesToMarkdown(challengeFiles = {}) {
function filesToMarkdown(challengeFiles = []) {
const moreThanOneFile = challengeFiles?.length > 1;
return challengeFiles.reduce((fileString, challengeFile) => {
if (!challengeFile) {