Closed jpedroschmitz closed 2 years ago
Latest commit: e0d3b2f39024fb13c6ee0fbb0425515779c74e6a
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Path | Size |
---|---|
packages/react-renderer/dist/rich-text-react-renderer.cjs.production.min.js | 5.27 KB (+0.4% 🔺) |
packages/react-renderer/dist/rich-text-react-renderer.esm.js | 5.21 KB (+0.55% 🔺) |
packages/html-renderer/dist/rich-text-html-renderer.cjs.production.min.js | 2.71 KB (0%) |
packages/html-renderer/dist/rich-text-html-renderer.esm.js | 2.66 KB (0%) |
This fix is related to an issue that usually happens with SVG. When an SVG is saved, GraphCMS can't set its dimensions, so the width and height of the SVG file are set to 0. So when rendering it, the image will be hidden because the width/height is set to 0. This PR makes sure we only add the width and height attributes if they are bigger than 0. Since the SVG usually has a width and height defined in its document, it will be rendered using its size.