dillon1000/react

Commit

clone json obj in relay flight client host config parser (#20465)

When `parseModel` suspends because of missing dependencies, it will exit and retry to parse later. However, in the relay implementation, the model is an object that we modify in place when we parse it, so when we we retry, part of the model might be parsed already into React elements, which will error because the parsing code expect a Flight model. This diff clones instead of mutating the original model, which fixes this error.
Browse files
Changed paths1 file
First-parent comparison
M packages/react-server-dom-relay/src/ReactFlightDOMRelayClientHostConfig.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…