Skip to content

Commit

Permalink
account for tables with no thead
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihor Bodnarchuk authored and simonbengtsson committed Feb 9, 2024
1 parent 66e2cf9 commit 9424aeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/applyPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default function (jsPDF: jsPDFConstructor) {
includeHiddenElements,
false,
)
const columns = head[0].map((c) => c.content)
const columns = head[0]?.map((c) => c.content) || []
return { columns, rows: body, data: body }
}

Expand Down

0 comments on commit 9424aeb

Please sign in to comment.