Skip to content

Commit

Permalink
refactor: implement feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
prachigarg19 committed Dec 7, 2023
1 parent 2166e0f commit 762dc6e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ export default function SampleTrees({
reader.onload = (event) => {
const csv = event.target?.result;
if (typeof csv !== 'string') return;
Papa.parse(csv, {
Papa.parse<SampleTree>(csv, {
header: true,
complete: (results) => {
const parsedHeaders = results.meta.fields || [];
const resultsData = results.data as SampleTree[];
const headerValidity = checkHeaderValidity(parsedHeaders);
const resultsData = results.data as SampleTree[];
if (headerValidity.isValid) {
parsedHeaders.length > 7
? setHasIgnoredColumns(true)
Expand Down

0 comments on commit 762dc6e

Please sign in to comment.