Don't clear static flags in resetWorkInProgress
Fixes the regression test added in #20433
Andrew Clark committed
Dec 11, 2020 at 15:37 UTC
a6329b10508e9b27222392dc03d7867d82b2e984
2 files changed
+2
-2
packages/react-reconciler/src/ReactFiber.new.js
+1
-1
@@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
365
366
// Reset the effect flags but keep any Placement tags, since that's something
367
// that child fiber is setting, not the reconciliation.
368
- workInProgress.flags &= Placement;
368
+ workInProgress.flags &= StaticMask | Placement;
369
370
// The effect list is no longer valid.
371
workInProgress.nextEffect = null;
packages/react-reconciler/src/ReactFiber.old.js
+1
-1
@@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {
365
366
// Reset the effect flags but keep any Placement tags, since that's something
367
// that child fiber is setting, not the reconciliation.
368
- workInProgress.flags &= Placement;
368
+ workInProgress.flags &= StaticMask | Placement;
369
370
// The effect list is no longer valid.
371
workInProgress.nextEffect = null;