From 69be472c11231056d297a7b73dd0b121905606d3 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 12 Sep 2023 22:17:03 -0400 Subject: [PATCH] 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.) --- packages/react-server/src/ReactFizzServer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-server/src/ReactFizzServer.js b/packages/react-server/src/ReactFizzServer.js index 8b2ff151d62bd..a26632bbd01be 100644 --- a/packages/react-server/src/ReactFizzServer.js +++ b/packages/react-server/src/ReactFizzServer.js @@ -578,6 +578,7 @@ function createTask( context, treeContext, thenableState, + childIndex: -1, }: any); if (__DEV__) { task.componentStack = null;