Browse Source

avoid division by zero

if preview didn't find a row, avgFieldCount will be NaN or Infinity
pull/204/head
Jan Hesse 10 years ago
parent
commit
40f5ebcbf2
  1. 1
      papaparse.js

1
papaparse.js

@ -903,6 +903,7 @@ @@ -903,6 +903,7 @@
}
}
if (preview.data.length > 0)
avgFieldCount /= preview.data.length;
if ((typeof bestDelta === 'undefined' || delta < bestDelta)

Loading…
Cancel
Save