Skip to content

Commit

Permalink
Fixed #486, batch export to SVG did not work properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jszuminski committed Apr 8, 2024
1 parent f1a4cab commit bbe4e9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export const batchExport = async (options) => {
// Save the base64 from a buffer to a correct image file
writeFileSync(
info.options.export.outfile,
Buffer.from(info.result, 'base64')
info.options.export.type !== 'svg'
? Buffer.from(info.result, 'base64')
: info.result
);
}
)
Expand Down

0 comments on commit bbe4e9e

Please sign in to comment.