diff --git a/src/components/workspace/ExecuteFile/ExecuteFile.tsx b/src/components/workspace/ExecuteFile/ExecuteFile.tsx index 860180d..0feeec9 100644 --- a/src/components/workspace/ExecuteFile/ExecuteFile.tsx +++ b/src/components/workspace/ExecuteFile/ExecuteFile.tsx @@ -98,15 +98,15 @@ const ExecuteFile: FC = ({ const selectFile = (e: any) => { const selectedFile = fileList.find((f) => { - if (typeof e === 'string') return f.id === e; - return f.id === e.target.value; + if (typeof e === 'string') return f?.id === e; + return f?.id === e?.target?.value; }); setSelectedFile(selectedFile); }; useEffect(() => { setSelectedFile(fileList[0]); - }, [fileList]); + }, []); return (