Skip to content

Commit

Permalink
Fix: Initialize childIndex in Task constructor (facebook#27367)
Browse files Browse the repository at this point in the history
This field was not being initialized. Although the property is part of
the Flow type, the type error wasn't caught because the constructor
itself is not covered by Flow, which is unfortunate. (I assume this is
related to the dev-only componentStack property.)
  • Loading branch information
acdlite authored and AndyPengc12 committed Apr 15, 2024
1 parent ea31cf9 commit 397cd3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-server/src/ReactFizzServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ function createTask(
context,
treeContext,
thenableState,
childIndex: -1,
}: any);
if (__DEV__) {
task.componentStack = null;
Expand Down

0 comments on commit 397cd3f

Please sign in to comment.