Skip to content

Commit

Permalink
Add _debugStack and _debugTask under enableObjectFiber flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kassens committed Jul 18, 2024
1 parent 163365a commit 6cc6e7a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/react-reconciler/src/ReactFiber.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,15 @@ function createFiberImplObject(
}

if (__DEV__) {
// This isn't directly used but is handy for debugging internals:
fiber._debugInfo = null;
fiber._debugOwner = null;
if (enableOwnerStacks) {
fiber._debugStack = null;
fiber._debugTask = null;
}
fiber._debugNeedsRemount = false;
fiber._debugHookTypes = null;

if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
Object.preventExtensions(fiber);
}
Expand Down

0 comments on commit 6cc6e7a

Please sign in to comment.