fix(inputFileComponent): handle case when fileTypes is undefined to prevent error when joining the array

This commit is contained in:
anovazzi1 2023-11-30 16:16:17 -03:00
commit d26b6e36b2

View file

@ -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