-
Notifications
You must be signed in to change notification settings - Fork 46.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix resolving of references to deduped props in lazy elements (#30441)
When a model references a deduped object of a blocked element that has subsequently been turned into a lazy element, we need to wait for the lazy element's chunk to resolve before resolving the reference. Without the fix, the new test failed with the following runtime error: ``` TypeError: Cannot read properties of undefined (reading 'children') 1003 | let value = chunk.value; 1004 | for (let i = 1; i < path.length; i++) { > 1005 | value = value[path[i]]; | ^ 1006 | } 1007 | const chunkValue = map(response, value); 1008 | if (__DEV__ && chunk._debugInfo) { at getOutlinedModel (packages/react-client/src/ReactFlightClient.js:1005:26) ``` The bug was uncovered after updating React in Next.js in vercel/next.js#66711.
- Loading branch information
1 parent
933b737
commit 7600225
Showing
2 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters