Skip to content

Commit

Permalink
Don't clear static flags in resetWorkInProgress
Browse files Browse the repository at this point in the history
Fixes the regression test added in #20433
  • Loading branch information
acdlite committed Dec 18, 2020
1 parent 1cf59f3 commit a6329b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiber.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {

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

// The effect list is no longer valid.
workInProgress.nextEffect = null;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiber.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ export function resetWorkInProgress(workInProgress: Fiber, renderLanes: Lanes) {

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

// The effect list is no longer valid.
workInProgress.nextEffect = null;
Expand Down

0 comments on commit a6329b1

Please sign in to comment.