Skip to content

Commit 49ecc81

Browse files
committed
feat: fix media in a set
1 parent c7ccf37 commit 49ecc81

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

apps/frontend/src/components/new-launch/manage.modal.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,16 @@ export const ManageModal: FC<AddEditModalProps> = (props) => {
249249
value: post.values.map((value: any) => ({
250250
...(value.id ? { id: value.id } : {}),
251251
content: value.content.slice(0, post.maximumCharacters || 1000000),
252-
image: value.media.map(({ id, path, alt, thumbnail, thumbnailTimestamp }: any) => ({ id, path, alt, thumbnail, thumbnailTimestamp })) || [],
252+
image:
253+
(value?.media || []).map(
254+
({ id, path, alt, thumbnail, thumbnailTimestamp }: any) => ({
255+
id,
256+
path,
257+
alt,
258+
thumbnail,
259+
thumbnailTimestamp,
260+
})
261+
) || [],
253262
})),
254263
})),
255264
};

0 commit comments

Comments
 (0)