Skip to content

Commit 30cc158

Browse files
committed
Don't clear static flags in resetWorkInProgress
Fixes the regression test added in facebook#20433
1 parent 9e71962 commit 30cc158

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
363363
// We assume pendingProps, index, key, ref, return are still untouched to
364364
// avoid doing another reconciliation.
365365

366-
// Reset the effect tag but keep any Placement tags, since that's something
366+
// 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)