From 49ecc81763d444c0f87aa3156fb7aef16253a5eb Mon Sep 17 00:00:00 2001 From: Nevo David Date: Mon, 7 Jul 2025 14:11:37 +0700 Subject: [PATCH] feat: fix media in a set --- .../src/components/new-launch/manage.modal.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/frontend/src/components/new-launch/manage.modal.tsx b/apps/frontend/src/components/new-launch/manage.modal.tsx index ba98a3ed..be53586b 100644 --- a/apps/frontend/src/components/new-launch/manage.modal.tsx +++ b/apps/frontend/src/components/new-launch/manage.modal.tsx @@ -249,7 +249,16 @@ export const ManageModal: FC = (props) => { value: post.values.map((value: any) => ({ ...(value.id ? { id: value.id } : {}), content: value.content.slice(0, post.maximumCharacters || 1000000), - image: value.media.map(({ id, path, alt, thumbnail, thumbnailTimestamp }: any) => ({ id, path, alt, thumbnail, thumbnailTimestamp })) || [], + image: + (value?.media || []).map( + ({ id, path, alt, thumbnail, thumbnailTimestamp }: any) => ({ + id, + path, + alt, + thumbnail, + thumbnailTimestamp, + }) + ) || [], })), })), };