Skip to content

Commit

Permalink
Add TODO
Browse files Browse the repository at this point in the history
Happened to find this while writing a test. A JSX element comparison
failed because one of them elements had a functional component as an
owner, which should ever happen.

I'll add a regression test later.
  • Loading branch information
acdlite committed Apr 7, 2020
1 parent 60321ba commit 6f67d0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-reconciler/src/ReactFiberWorkLoop.js
Expand Up @@ -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
Expand Down

0 comments on commit 6f67d0a

Please sign in to comment.