diff --git a/autogpt_platform/frontend/src/components/atoms/FileInput/FileInput.tsx b/autogpt_platform/frontend/src/components/atoms/FileInput/FileInput.tsx index 26370ce8ab..ca4e5fefbc 100644 --- a/autogpt_platform/frontend/src/components/atoms/FileInput/FileInput.tsx +++ b/autogpt_platform/frontend/src/components/atoms/FileInput/FileInput.tsx @@ -109,7 +109,7 @@ export function FileInput(props: Props) { if (val && typeof val === "object") { const obj = val as Record; if (typeof obj.name === "string") { - return getFileLabel(obj.name, (obj.type as string) || ""); + return getFileLabel(obj.name, typeof obj.type === "string" ? obj.type : ""); } if (typeof obj.type === "string") { const mimeParts = obj.type.split("/");