Skip to content

Commit

Permalink
Fix crash on downloading empty table as CSV (gregnb#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkiac authored and lalong13 committed Jan 15, 2020
1 parent 6e57dd2 commit ca7c3e9
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 ca7c3e9

Please sign in to comment.