Skip to content

Commit 69be472

Browse files
authored
Fix: Initialize childIndex in Task constructor (#27367)
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.)
1 parent d07921e commit 69be472

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/react-server/src/ReactFizzServer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,7 @@ function createTask(
578578
context,
579579
treeContext,
580580
thenableState,
581+
childIndex: -1,
581582
}: any);
582583
if (__DEV__) {
583584
task.componentStack = null;

0 commit comments

Comments
 (0)