Skip to content

Commit 53bf803

Browse files
authored
fix: check SVG node type is not currently supported (#2836)
1 parent 885df2b commit 53bf803

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.changeset/pink-owls-drum.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@react-pdf/render": patch
3+
---
4+
5+
[fix] "TypeError: renderFn is not a function"
6+
It may also address issue #2644

packages/render/src/primitives/renderSvg.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,10 @@ const renderFns = {
172172
const renderNode = (ctx, node) => {
173173
const renderFn = renderFns[node.type];
174174

175-
if (renderFns) {
175+
if (renderFn) {
176176
renderFn(ctx, node);
177177
} else {
178-
console.warn(`SVG node of type ${node.type} is not currenty supported`);
178+
console.warn(`SVG node of type ${node.type} is not currently supported`);
179179
}
180180
};
181181

0 commit comments

Comments
 (0)