(jsonChildren)
| 112 | } |
| 113 | |
| 114 | function jsonChildrenToJSXChildren(jsonChildren) { |
| 115 | if (jsonChildren !== null) { |
| 116 | if (jsonChildren.length === 1) { |
| 117 | return jsonChildToJSXChild(jsonChildren[0]); |
| 118 | } else if (jsonChildren.length > 1) { |
| 119 | const jsxChildren = []; |
| 120 | let allJSXChildrenAreStrings = true; |
| 121 | let jsxChildrenString = ''; |
| 122 | for (let i = 0; i < jsonChildren.length; i++) { |
| 123 | const jsxChild = jsonChildToJSXChild(jsonChildren[i]); |
| 124 | jsxChildren.push(jsxChild); |
| 125 | if (allJSXChildrenAreStrings) { |
| 126 | if (typeof jsxChild === 'string') { |
| 127 | jsxChildrenString += jsxChild; |
| 128 | } else if (jsxChild !== null) { |
| 129 | allJSXChildrenAreStrings = false; |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | return allJSXChildrenAreStrings ? jsxChildrenString : jsxChildren; |
| 134 | } |
| 135 | } |
| 136 | return null; |
| 137 | } |
no test coverage detected