Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clone json obj in react native flight client host config parser (face…
…book#20474) As per Seb's comment in facebook#20465, we need to do the same thing in React Native as we do in Relay. 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.
- Loading branch information