From 83e419b5f2b29e5a42be92097be81e3b23b5b05a Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Tue, 7 Jan 2025 21:49:59 +0700 Subject: [PATCH] feat: update fixing error --- components/form/content/audio-update-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/form/content/audio-update-form.tsx b/components/form/content/audio-update-form.tsx index 8df8e277..f104309e 100644 --- a/components/form/content/audio-update-form.tsx +++ b/components/form/content/audio-update-form.tsx @@ -145,7 +145,7 @@ export default function FormAudioUpdate() { const getCategories = async () => { try { const category = await listEnableCategory(fileTypeId); - const resCategory: Category[] = category.data.data.content; + const resCategory: Category[] = category?.data.data.content; setCategories(resCategory); console.log("data category", resCategory); @@ -171,7 +171,7 @@ export default function FormAudioUpdate() { async function initState() { if (id) { const response = await detailMedia(id); - const details = response.data?.data; + const details = response?.data?.data; setDetail(details);