Skip to content

Commit

Permalink
Merge pull request #43 from cedomir/patch-1
Browse files Browse the repository at this point in the history
Fix type checker
  • Loading branch information
nzambello authored May 2, 2020
2 parents 7181762 + 993dd24 commit 75877ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ const CSVReader: React.FC<CSVReaderProps> = ({
}) => {
const handleChangeFile = (e: React.ChangeEvent<HTMLInputElement>) => {
let reader: FileReader = new FileReader()
const files: FileList = e.target.files
const files: FileList = e.target.files!
if (files.length > 0) {
const fileInfo: IFileInfo = {
name: files[0].name,
size: files[0].size,
type: files[0].type,
}

reader.onload = (event: Event) => {
reader.onload = (_event: Event) => {
const csvData = PapaParse.parse(
reader.result as string,
Object.assign(parserOptions, {
Expand Down

0 comments on commit 75877ac

Please sign in to comment.