Skip to content

Commit

Permalink
download csv fix. Check type of column
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiggr committed Oct 19, 2022
1 parent 7a3bfe7 commit a7a498f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Utils/Sources/Sources.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ function getData(array) {
for (let key in array[i]) {
const column = array[i][key];
if (row !== '') row += ',';
if (column.includes(',')) {
if (
(typeof column === 'number' && column.toString().includes(',')) ||
(typeof column === 'string' && column.includes(','))
) {
row += `"${column}"`;
} else {
row += column;
Expand Down

0 comments on commit a7a498f

Please sign in to comment.