Skip to content

Commit

Permalink
fix: fix empty strings replaced with defaults in creator and `produ…
Browse files Browse the repository at this point in the history
…cer` props (#2320)

* fix: fix empty strings replaced with defaults in `creator` and `producer` props

* Add changeset
  • Loading branch information
wojtekmaj committed Jun 1, 2023
1 parent 8636812 commit 5385a43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-ears-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/render': patch
---

Fixed empty strings replaced with defaults in `creator` and `producer` props
4 changes: 2 additions & 2 deletions packages/render/src/operations/addMetadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const addMetadata = (ctx, doc) => {
const author = props.author || null;
const subject = props.subject || null;
const keywords = props.keywords || null;
const creator = props.creator || 'react-pdf';
const producer = props.producer || 'react-pdf';
const creator = props.creator ?? 'react-pdf';
const producer = props.producer ?? 'react-pdf';

setProp('Title', title);
setProp('Author', author);
Expand Down

0 comments on commit 5385a43

Please sign in to comment.