Is PapaParse adding an empty string to the end of its data array?
You need to use skipEmptyLines: true
in parse config. For example:
Papa.parse(this.csvData, {skipEmptyLines: true,})
it was adding empty line to my iteration as well. i decided to skip it by doing loop:
for(let i=0;i<data.length -1;i++){