Skip to content

Commit

Permalink
dev: added nullish handling as empty list for results
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Apr 3, 2020
1 parent a6d1e5e commit 0a311f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const CSVReader: React.FC<CSVReaderProps> = ({
encoding: fileEncoding,
}),
)
onFileLoaded(csvData.data, fileInfo)
onFileLoaded(csvData?.data ?? [], fileInfo)
}

reader.readAsText(files[0], fileEncoding)
Expand Down

0 comments on commit 0a311f6

Please sign in to comment.