Skip to content

Commit

Permalink
Fix: Initialize childIndex in Task constructor (#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 Sep 13, 2023
1 parent d07921e commit 69be472
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 69be472

Please sign in to comment.