Skip to content

Commit

Permalink
fix: image dimension warning for JSON sources (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomura committed Jun 4, 2022
1 parent 83b53d0 commit 9347466
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/selfish-queens-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@react-pdf/render': patch
---

fix: image dimension warning for JSON sources
4 changes: 3 additions & 1 deletion packages/render/src/primitives/renderImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ const drawImage = (ctx, node) => {
);
} else {
console.warn(
`Image with src '${node.props.src}' skipped due to invalid dimensions`,
`Image with src '${JSON.stringify(
node.props.src,
)}' skipped due to invalid dimensions`,
);
}
}
Expand Down

0 comments on commit 9347466

Please sign in to comment.