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 facebook#20433
  • Loading branch information
acdlite authored and koto committed Jun 15, 2021
1 parent 9691712 commit 3a2e8d8
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 3a2e8d8

Please sign in to comment.