Skip to content

Commit

Permalink
Pass childIndex as an argument to createTask
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Sep 13, 2023
1 parent b1317ce commit dab6e42
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/react-server/src/ReactFizzServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ export function createRequest(
request,
null,
children,
-1,
null,
rootSegment,
abortSet,
Expand Down Expand Up @@ -498,6 +499,7 @@ export function resumeRequest(
request,
null,
children,
-1,
null,
rootSegment,
abortSet,
Expand Down Expand Up @@ -555,6 +557,7 @@ function createTask(
request: Request,
thenableState: ThenableState | null,
node: ReactNodeList,
childIndex: number,
blockedBoundary: Root | SuspenseBoundary,
blockedSegment: Segment,
abortSet: Set<Task>,
Expand All @@ -572,6 +575,7 @@ function createTask(
}
const task: Task = ({
node,
childIndex,
ping: () => pingTask(request, task),
blockedBoundary,
blockedSegment,
Expand All @@ -582,7 +586,6 @@ function createTask(
context,
treeContext,
thenableState,
childIndex: -1,
}: any);
if (__DEV__) {
task.componentStack = null;
Expand Down Expand Up @@ -856,6 +859,7 @@ function renderSuspenseBoundary(
request,
null,
fallback,
-1,
parentBoundary,
boundarySegment,
fallbackAbortSet,
Expand Down Expand Up @@ -2027,6 +2031,7 @@ function spawnNewSuspendedTask(
request,
thenableState,
task.node,
task.childIndex,
task.blockedBoundary,
newSegment,
task.abortSet,
Expand All @@ -2036,7 +2041,6 @@ function spawnNewSuspendedTask(
task.context,
task.treeContext,
);
newTask.childIndex = task.childIndex;

if (__DEV__) {
if (task.componentStack !== null) {
Expand Down

0 comments on commit dab6e42

Please sign in to comment.