mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-13 21:02:08 +08: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:
parent
06fe9b6d16
commit
a64e732458
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user