Skip to content

Commit d181286

Browse files
committed
skip empty CSV lines
1 parent 56c6d4f commit d181286

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/parseData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const isNumeric = (s: string) => NUMERIC_RE.test(s.trim());
2424
const parseCsv = (csv: string) => {
2525
const firstRowResult = Papa.parse<string[]>(csv, {
2626
preview: 1,
27+
skipEmptyLines: true,
2728
worker: false,
2829
download: false,
2930
});
@@ -58,6 +59,7 @@ const parseCsv = (csv: string) => {
5859
worker: false,
5960
download: false,
6061
header: true,
62+
skipEmptyLines: true,
6163
});
6264

6365
console.log(latCol, lngCol);

0 commit comments

Comments
 (0)