Skip to content

Commit b43ee2a

Browse files
committed
Handle the two remaining cases
1 parent bc64684 commit b43ee2a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

packages/react-client/src/ReactFlightClient.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,8 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
10401040
// Initialize any debug info and block the initializing chunk on any
10411041
// unresolved entries.
10421042
initializeDebugChunk(response, chunk);
1043+
// TODO: The chunk might have transitioned to ERRORED now.
1044+
// Should we return early if that happens?
10431045
}
10441046

10451047
try {
@@ -1075,6 +1077,7 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
10751077
const initializedChunk: InitializedChunk<T> = (chunk: any);
10761078
initializedChunk.status = INITIALIZED;
10771079
initializedChunk.value = value;
1080+
initializedChunk.reason = null;
10781081

10791082
if (__DEV__) {
10801083
processChunkDebugInfo(response, initializedChunk, value);

packages/react-server/src/ReactFlightReplyServer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ function loadServerReference<A: Iterable<any>, T>(
478478
const initializedPromise: InitializedChunk<T> = (blockedPromise: any);
479479
initializedPromise.status = INITIALIZED;
480480
initializedPromise.value = resolvedValue;
481+
initializedPromise.reason = null;
481482
return resolvedValue;
482483
}
483484
} else if (bound instanceof ReactPromise) {

0 commit comments

Comments
 (0)