dillon1000/react

Commit

Fix runtime error that happens if a passive destroy function throws within an unmounted tree (#19543)

A passive effect's cleanup function may throw after an unmount. In that event, React sometimes threw an uncaught runtime error trying to access a property on a null stateNode field. This commit fixes that (and adds a regression test).
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberCommitWork.old.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedM packages/react-reconciler/src/__tests__/ReactHooksWithNoopRenderer-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…