diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index 7e2e8e0cef04b..a83f9a6f25056 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -1215,6 +1215,9 @@ function handleError(root, thrownValue) { resetContextDependencies(); resetHooksAfterThrow(); resetCurrentDebugFiberInDEV(); + // TODO: I found and added this missing line while investigating a + // separate issue. Write a regression test using string refs. + ReactCurrentOwner.current = null; if (workInProgress === null || workInProgress.return === null) { // Expected to be working on a non-root fiber. This is a fatal error