Skip to content

Commit 6f67d0a

Browse files
committed
Add TODO
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.
1 parent 60321ba commit 6f67d0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-reconciler/src/ReactFiberWorkLoop.js

+3
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,9 @@ function handleError(root, thrownValue) {
12151215
resetContextDependencies();
12161216
resetHooksAfterThrow();
12171217
resetCurrentDebugFiberInDEV();
1218+
// TODO: I found and added this missing line while investigating a
1219+
// separate issue. Write a regression test using string refs.
1220+
ReactCurrentOwner.current = null;
12181221

12191222
if (workInProgress === null || workInProgress.return === null) {
12201223
// Expected to be working on a non-root fiber. This is a fatal error

0 commit comments

Comments
 (0)