GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — clone json obj in react native flight client host config parser (#20474) · react/react@9f338e5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-server-native-relay/src
    • ReactFlightNativeRelayClientHostConfig.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig.js‎

Copy file name to clipboardExpand all lines: packages/react-server-native-relay/src/ReactFlightNativeRelayClientHostConfig.js
+10-3Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,25 @@ function parseModelRecursively(response: Response, parentObj, value) {
3636
}
3737
if (typeof value === 'object' && value !== null) {
3838
if (Array.isArray(value)) {
39+
const parsedValue = [];
3940
for (let i = 0; i < value.length; i++) {
40-
(value: any)[i] = parseModelRecursively(response, value, value[i]);
41+
(parsedValue: any)[i] = parseModelRecursively(
42+
response,
43+
value,
44+
value[i],
45+
);
4146
}
42-
return parseModelTuple(response, value);
47+
return parseModelTuple(response, parsedValue);
4348
} else {
49+
const parsedValue = {};
4450
for (const innerKey in value) {
45-
(value: any)[innerKey] = parseModelRecursively(
51+
(parsedValue: any)[innerKey] = parseModelRecursively(
4652
response,
4753
value,
4854
value[innerKey],
4955
);
5056
}
57+
return parsedValue;
5158
}
5259
}
5360
return value;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.