Skip to content

Commit a6329b1

Browse files
committed
Don't clear static flags in resetWorkInProgress
Fixes the regression test added in #20433
1 parent 1cf59f3 commit a6329b1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-reconciler/src/ReactFiber.new.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
365365

366366
// Reset the effect flags but keep any Placement tags, since that's something
367367
// that child fiber is setting, not the reconciliation.
368-
workInProgress.flags &= Placement;
368+
workInProgress.flags &= StaticMask | Placement;
369369

370370
// The effect list is no longer valid.
371371
workInProgress.nextEffect = null;

packages/react-reconciler/src/ReactFiber.old.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
365365

366366
// Reset the effect flags but keep any Placement tags, since that's something
367367
// that child fiber is setting, not the reconciliation.
368-
workInProgress.flags &= Placement;
368+
workInProgress.flags &= StaticMask | Placement;
369369

370370
// The effect list is no longer valid.
371371
workInProgress.nextEffect = null;

0 commit comments

Comments
 (0)