feat: update fixing error
This commit is contained in:
parent
1a7aa27262
commit
83e419b5f2
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue