Skip to content

Commit

Permalink
[Fizz] Pass task.childIndex in retryReplayTask (#27594)
Browse files Browse the repository at this point in the history
This was missed that we track the child index on the task. The
equivalent in retryRenderTask already has this.

The effect is that a lazy node that suspends gets its child index reset
to -1 even though it should resume in the index it left off.
  • Loading branch information
sebmarkbage authored Oct 26, 2023
1 parent 97047a8 commit 8c8ee9e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/react-server/src/ReactFizzServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3476,7 +3476,13 @@ function retryReplayTask(request: Request, task: ReplayTask): void {
const prevThenableState = task.thenableState;
task.thenableState = null;

renderNodeDestructive(request, task, prevThenableState, task.node, -1);
renderNodeDestructive(
request,
task,
prevThenableState,
task.node,
task.childIndex,
);

if (task.replay.pendingTasks === 1 && task.replay.nodes.length > 0) {
throw new Error(
Expand Down

0 comments on commit 8c8ee9e

Please sign in to comment.