[Fizz] Set keyPath for SuspenseList (#33320)

I missed setting the `keyPath` because the `renderChildrenArray` that
this is forked from doesn't need to set a path but since this is
rendered from the `SuspenseList` element it needs it.
This commit is contained in:
Sebastian Markbåge 2025-05-20 21:08:47 -04:00 committed by GitHub
parent 9c7b10e22e
commit 2388481283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1783,6 +1783,8 @@ function renderSuspenseListRows(
): void { ): void {
// This is a fork of renderChildrenArray that's aware of tracking rows. // This is a fork of renderChildrenArray that's aware of tracking rows.
const prevKeyPath = task.keyPath; const prevKeyPath = task.keyPath;
const prevTreeContext = task.treeContext;
const prevRow = task.row;
const previousComponentStack = task.componentStack; const previousComponentStack = task.componentStack;
let previousDebugTask = null; let previousDebugTask = null;
if (__DEV__) { if (__DEV__) {
@ -1792,10 +1794,9 @@ function renderSuspenseListRows(
pushServerComponentStack(task, (task.node: any).props.children._debugInfo); pushServerComponentStack(task, (task.node: any).props.children._debugInfo);
} }
const prevTreeContext = task.treeContext; task.keyPath = keyPath;
const prevRow = task.row;
const totalChildren = rows.length;
const totalChildren = rows.length;
let previousSuspenseListRow: null | SuspenseListRow = null; let previousSuspenseListRow: null | SuspenseListRow = null;
if (task.replay !== null) { if (task.replay !== null) {
// Replay // Replay