Skip to content

Commit

Permalink
fix(exporter): Allow csv export for object field type (angular-ui#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 Devin Fields committed Oct 30, 2018
1 parent 9b4572e commit 94c44e8
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 94c44e8

Please sign in to comment.