Skip to content

Commit

Permalink
Fix crash on downloading empty table as CSV (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiac authored and gabrielliwerant committed Oct 15, 2019
1 parent 94d8cd0 commit 35f129d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function createCSVDownload(columns, data, options) {
const CSVHead = buildHead(columns);

const buildBody = data => {
if (!data.length) return '';
return data
.reduce(
(soFar, row) =>
Expand Down

0 comments on commit 35f129d

Please sign in to comment.