Skip to content

Commit

Permalink
Fix resolving of references to deduped props in lazy elements
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Jul 24, 2024
1 parent 3722dc7 commit d994fd2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/react-client/src/ReactFlightClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,16 @@ function getOutlinedModel<T>(
let value = chunk.value;
for (let i = 1; i < path.length; i++) {
value = value[path[i]];
if (value.$$typeof === REACT_LAZY_TYPE) {
return waitForReference(
value._payload,
parentObject,
key,
response,
map,
path.slice(i),
);
}
}
const chunkValue = map(response, value);
if (__DEV__ && chunk._debugInfo) {
Expand Down

0 comments on commit d994fd2

Please sign in to comment.