Skip to content

Commit 31fd817

Browse files
committed
Fix: No extra render pass when reverting to client render
This fixes the bug described by the previous commit.
1 parent 938a27b commit 31fd817

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-reconciler/src/ReactFiberCompleteWork.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ import {
8585
StaticMask,
8686
MutationMask,
8787
Passive,
88-
Incomplete,
89-
ShouldCapture,
9088
ForceClientRender,
9189
SuspenseyCommit,
9290
ScheduleRetry,
@@ -839,7 +837,7 @@ function completeDehydratedSuspenseBoundary(
839837
) {
840838
warnIfUnhydratedTailNodes(workInProgress);
841839
resetHydrationState();
842-
workInProgress.flags |= ForceClientRender | Incomplete | ShouldCapture;
840+
workInProgress.flags |= ForceClientRender | DidCapture;
843841

844842
return false;
845843
}
@@ -1284,7 +1282,7 @@ function completeWork(
12841282
nextState,
12851283
);
12861284
if (!fallthroughToNormalSuspensePath) {
1287-
if (workInProgress.flags & ShouldCapture) {
1285+
if (workInProgress.flags & ForceClientRender) {
12881286
// Special case. There were remaining unhydrated nodes. We treat
12891287
// this as a mismatch. Revert to client rendering.
12901288
return workInProgress;

0 commit comments

Comments
 (0)