Skip to content

Commit

Permalink
Merge pull request mholt#199 from pykiss/master
Browse files Browse the repository at this point in the history
symetric parse and unparse
  • Loading branch information
mholt committed Sep 12, 2015
2 parents 6fe5c2b + bc783fd commit 48522bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion papaparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,10 @@
if (_input.data instanceof Array)
{
if (!_input.fields)
_input.fields = _input.data[0] instanceof Array
_input.fields = _input.meta && _input.meta.fields;

if (!_input.fields)
_input.fields = _input.data[0] instanceof Array
? _input.fields
: objectKeys(_input.data[0]);

Expand Down

0 comments on commit 48522bd

Please sign in to comment.