From d26b6e36b2a8f82be09d09335ab061d818d8f49e Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Thu, 30 Nov 2023 16:16:17 -0300 Subject: [PATCH] fix(inputFileComponent): handle case when fileTypes is undefined to prevent error when joining the array --- src/frontend/src/components/inputFileComponent/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/components/inputFileComponent/index.tsx b/src/frontend/src/components/inputFileComponent/index.tsx index b77dfed27..0f8f159fc 100644 --- a/src/frontend/src/components/inputFileComponent/index.tsx +++ b/src/frontend/src/components/inputFileComponent/index.tsx @@ -44,7 +44,7 @@ export default function InputFileComponent({ // Create a file input element const input = document.createElement("input"); input.type = "file"; - input.accept = fileTypes.join(","); + input.accept = fileTypes?.join(","); input.style.display = "none"; // Hidden from view input.multiple = false; // Allow only one file selection