Skip to content

Commit b835af2

Browse files
committed
Use resolved value in createModelResolver instead of blocked.value
1 parent 36f7400 commit b835af2

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/react-client/src/ReactFlightClient.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ function initializeModelChunk<T>(chunk: ResolvedModelChunk<T>): void {
421421
initializingChunkBlockedModel !== null &&
422422
initializingChunkBlockedModel.deps > 0
423423
) {
424-
initializingChunkBlockedModel.value = value;
425424
// We discovered new dependencies on modules that are not yet resolved.
426425
// We have to go the BLOCKED state until they're resolved.
427426
const blockedChunk: BlockedChunk<T> = (chunk: any);
@@ -577,10 +576,7 @@ function createModelResolver<T>(
577576
blocked.deps++;
578577
}
579578
} else {
580-
blocked = initializingChunkBlockedModel = {
581-
deps: cyclic ? 0 : 1,
582-
value: (null: any),
583-
};
579+
blocked = initializingChunkBlockedModel = {deps: cyclic ? 0 : 1};
584580
}
585581
return value => {
586582
parentObject[key] = value;
@@ -592,9 +588,9 @@ function createModelResolver<T>(
592588
const resolveListeners = chunk.value;
593589
const initializedChunk: InitializedChunk<T> = (chunk: any);
594590
initializedChunk.status = INITIALIZED;
595-
initializedChunk.value = blocked.value;
591+
initializedChunk.value = value;
596592
if (resolveListeners !== null) {
597-
wakeChunk(resolveListeners, blocked.value);
593+
wakeChunk(resolveListeners, value);
598594
}
599595
}
600596
};

0 commit comments

Comments
 (0)