Skip to content

Commit

Permalink
fix(exporter): Allow csv export for object field type (#6870)
Browse files Browse the repository at this point in the history
* Fix csv export for object field type

* Fix csv export for object field type

* Fix not applied for Date type

* Fix not applied for Date type
  • Loading branch information
rinose authored and mportuga committed Oct 16, 2018
1 parent 3057b46 commit 24d4224
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/features/exporter/js/exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,10 @@
if (typeof(field.value) === 'string') {
return '"' + field.value.replace(/"/g,'""') + '"';
}

if (typeof(field.value) === 'object' && !(field.value instanceof Date)) {
return '"' + JSON.stringify(field.value).replace(/"/g,'""') + '"';
}
// if field type is date, numberStr
return JSON.stringify(field.value);
},

Expand Down

0 comments on commit 24d4224

Please sign in to comment.