feat: update fixing error

This commit is contained in:
hanif salafi 2025-01-07 21:49:59 +07:00
parent 1a7aa27262
commit 83e419b5f2
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ export default function FormAudioUpdate() {
const getCategories = async () => { const getCategories = async () => {
try { try {
const category = await listEnableCategory(fileTypeId); const category = await listEnableCategory(fileTypeId);
const resCategory: Category[] = category.data.data.content; const resCategory: Category[] = category?.data.data.content;
setCategories(resCategory); setCategories(resCategory);
console.log("data category", resCategory); console.log("data category", resCategory);
@ -171,7 +171,7 @@ export default function FormAudioUpdate() {
async function initState() { async function initState() {
if (id) { if (id) {
const response = await detailMedia(id); const response = await detailMedia(id);
const details = response.data?.data; const details = response?.data?.data;
setDetail(details); setDetail(details);