diff --git a/src/components/media.tsx b/src/components/media.tsx index 8696a01..59a1497 100644 --- a/src/components/media.tsx +++ b/src/components/media.tsx @@ -504,7 +504,10 @@ export const ReportMediaContent = ({ source }) => { return null; } - const uploadName = decodeURIComponent(get(record, "event_json.content.body")?.toString()); + let uploadName = ""; + if (get(record, "event_json.content.body")) { + uploadName = decodeURIComponent(get(record, "event_json.content.body")?.toString()); + } return ; }; diff --git a/src/resources/users.tsx b/src/resources/users.tsx index e04be10..6d50e4a 100644 --- a/src/resources/users.tsx +++ b/src/resources/users.tsx @@ -505,7 +505,7 @@ export const UserEdit = (props: EditProps) => { - decodeURIComponent(record.upload_name)} /> + record.upload_name ? decodeURIComponent(record.upload_name) : ""} />