You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewCSVError(`Expected object rows for validation, but first parsed record (approx. file line ${firstDataRowActualLine}) is not an object.`);
647
642
}
648
643
constsampleKeys=Object.keys(parsedData[0]);
649
-
parsedData.forEach((row,i)=>{
650
-
if(!(row&&typeofrow==='object')){thrownewCSVError(`Row at approx. file line ${firstDataRowActualLine+i} (parsed index ${i}) is not an object as expected.`);}
if(Object.keys(row).length!==sampleKeys.length&&!relaxCount){thrownewCSVError(`Row at approx. file line ${firstDataRowActualLine+i} (parsed index ${i}) has inconsistent column count. Expected ${sampleKeys.length}, got ${Object.keys(row).length}.`);}
653
-
});
644
+
parsedData.forEach((row,i)=>{
645
+
if(!(row&&typeofrow==='object')){thrownewCSVError(`Row at approx. file line ${firstDataRowActualLine+i} (parsed index ${i}) is not an object as expected.`);}
646
+
if(Object.keys(row).length!==sampleKeys.length){thrownewCSVError(`Row at approx. file line ${firstDataRowActualLine+i} (parsed index ${i}) has inconsistent column count. Expected ${sampleKeys.length}, got ${Object.keys(row).length}.`);}
0 commit comments