const csvString2 = "a;brn1;2rn3;4rn";
const csvArray2 = Papa.parse(csvString2, { header: true }).data;
console.log("csvArray2", csvArray2);
const csvString3 = "a;brn1;2rn3;4";
const csvArray3 = Papa.parse(csvString3, { header: true }).data;
console.log("csvArray3", csvArray3);
gives
csvArray2 [ { 'a;b': '1;2' }, { 'a;b': '3;4' }, { 'a;b': '' } ]
csvArray3 [ { a: '1', b: '2' }, { a: '3', b: '4' } ]
skipEmptyLines: true
would solve the problem, but why the empty rows affects headers ?