From 6fcba4dc38a979500c768df62c757ece9f166962 Mon Sep 17 00:00:00 2001 From: antonio Date: Tue, 14 Apr 2015 21:31:05 +0200 Subject: [PATCH] symetric parse and unparse --- papaparse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/papaparse.js b/papaparse.js index 193f62d..715601c 100644 --- a/papaparse.js +++ b/papaparse.js @@ -248,7 +248,7 @@ if (_input.data instanceof Array) { if (!_input.fields) - _input.fields = _input.data[0] instanceof Array + _input.fields = ( _input.meta && _input.meta.fields ) || _input.data[0] instanceof Array ? _input.fields : objectKeys(_input.data[0]);