diff --git a/src/index.tsx b/src/index.tsx index 7b641e5..0726501 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -53,7 +53,7 @@ const CSVReader: React.FC = ({ encoding: fileEncoding, }), ) - onFileLoaded(csvData.data, fileInfo) + onFileLoaded(csvData?.data ?? [], fileInfo) } reader.readAsText(files[0], fileEncoding)