From 511b991500a7b14365ad3010af815e174c60e0e9 Mon Sep 17 00:00:00 2001 From: jc <46619361+juancwu@users.noreply.github.com> Date: Wed, 11 Dec 2024 14:54:30 -0500 Subject: [PATCH] only set the sections if sections is array --- frontend/src/services/project.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/services/project.ts b/frontend/src/services/project.ts index 2bf4da5f..e5f51829 100644 --- a/frontend/src/services/project.ts +++ b/frontend/src/services/project.ts @@ -65,8 +65,8 @@ export interface Project { // Transform backend response to frontend format const transformProject = (project: ProjectResponse): Project => { let sections: ProjectSection[] = []; - - if (project.Sections) { + + if (project.Sections && Array.isArray(project.Sections)) { sections = project.Sections.map(s => ({ id: s.id, title: s.title || '',