diff --git a/packages/react-reconciler/src/ReactFiberCommitWork.new.js b/packages/react-reconciler/src/ReactFiberCommitWork.new.js index db3fa4d57d52e..adc61e1aafd1c 100644 --- a/packages/react-reconciler/src/ReactFiberCommitWork.new.js +++ b/packages/react-reconciler/src/ReactFiberCommitWork.new.js @@ -335,7 +335,7 @@ function commitHookEffectListUnmount(tag: HookEffectTag, finishedWork: Fiber) { const destroy = effect.destroy; effect.destroy = undefined; if (destroy !== undefined) { - destroy(); + safelyCallDestroy(finishedWork, destroy); } } effect = effect.next;