(key, val)
| 178 | |
| 179 | // Serialize a server React tree node to JSON. |
| 180 | function stringifyNodeOnServer(key, val) { |
| 181 | if (val != null && val.$$typeof === Symbol.for('react.element')) { |
| 182 | // Remove fake MDX props. |
| 183 | const { mdxType, originalType, parentName, ...cleanProps } = val.props |
| 184 | return ['$r', typeof val.type === 'string' ? val.type : mdxType, val.key, cleanProps] |
| 185 | } else { |
| 186 | return val |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // Cache it on the disk. |
| 191 | await store.set(hash, output) |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…