mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-11 07:00:41 -04:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user