Skip to content

Commit

Permalink
fix: Improve the inference of the header name when using function as …
Browse files Browse the repository at this point in the history
…value (#395)
  • Loading branch information
juanjoDiaz authored and knownasilya committed May 26, 2019
1 parent ffda9af commit 590d19a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/JSON2CSVBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class JSON2CSVBase {
}

if (typeof fieldInfo.value === 'function') {
const label = fieldInfo.label || fieldInfo.value;
const label = fieldInfo.label || fieldInfo.value.name || '';
const field = { label, default: defaultValue };
return {
label,
Expand Down

0 comments on commit 590d19a

Please sign in to comment.