Skip to content

Commit aab7d95

Browse files
authored
fix: note rendering (#2951)
* fix: note rendering * Create unlucky-coats-crash.md
1 parent 77e480c commit aab7d95

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/unlucky-coats-crash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-pdf/renderer": patch
3+
---
4+
5+
fix: note rendering

packages/renderer/src/renderer.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ const createTextInstance = (text) => ({ type: 'TEXT_INSTANCE', value: text });
1515

1616
const appendChild = (parent, child) => {
1717
const isParentText =
18-
parent.type === 'TEXT' || parent.type === 'LINK' || parent.type === 'TSPAN';
18+
parent.type === 'TEXT' ||
19+
parent.type === 'LINK' ||
20+
parent.type === 'TSPAN' ||
21+
parent.type === 'NOTE';
22+
1923
const isChildTextInstance = child.type === 'TEXT_INSTANCE';
2024
const isOrphanTextInstance = isChildTextInstance && !isParentText;
2125

0 commit comments

Comments
 (0)