Skip to content

Commit 2eba70b

Browse files
authored
fix(reconciler): prevent crash when removing elements (#3261)
1 parent cfd3a18 commit 2eba70b

3 files changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/old-crabs-type.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-pdf/reconciler": patch
3+
---
4+
5+
fix(reconciler): prevent crash when removing elements

packages/reconciler/build/trim-reconciler.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const KEEP_OPTIONS = {
3333
shouldAttemptEagerTransition: true,
3434
requestPostPaintCallback: true,
3535
maySuspendCommit: true,
36+
detachDeletedInstance: true
3637
};
3738

3839
const STATIC_OPTIONS = {

packages/reconciler/src/reconciler-31.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const createRenderer: ReconcilerFactory = ({
5555
resolveUpdatePriority: () => DefaultEventPriority,
5656
setCurrentUpdatePriority: () => {},
5757
shouldAttemptEagerTransition: () => false,
58+
detachDeletedInstance: () => {},
5859
});
5960

6061
const createContainer = (container) => {

0 commit comments

Comments
 (0)