Skip to content

Commit 8d22556

Browse files
committed
should we reset thenables to unknown status?
1 parent 2ac7976 commit 8d22556

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/react-server/src/ReactFizzServer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4616,6 +4616,13 @@ function abortTask(task: Task, request: Request, error: mixed): void {
46164616
}
46174617
pushHaltedAwaitOnComponentStack(task, debugInfo);
46184618
if (task.thenableState !== null) {
4619+
// TODO: really?
4620+
// If the thenable was resolved in the meantime, we won't get a stack.
4621+
// We won't know which thenable in thenableState is newly settled though.
4622+
// We can't just clear status fields on each thenable because then the
4623+
// stack may point at a thenable that wasn't stalled. In those cases
4624+
// it's better to point at the callsite of the stalled Component as an
4625+
// entrypoint instead of the wrong thenable.
46194626
pushSuspendedCallSiteOnComponentStack(request, task);
46204627
}
46214628
}

0 commit comments

Comments
 (0)