We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c01fe0 commit 16ba9c5Copy full SHA for 16ba9c5
src/components/Term/index.jsx
@@ -15,9 +15,9 @@ import autoType from "./auto-type.js";
15
* @param {React.ReactNode} props.children
16
*/
17
export default function Term({ type = null, children }) {
18
- function unwrap(mdx) {
19
- if (typeof mdx === "string") return mdx;
20
- else return unwrap(mdx.props.children);
+ function unwrapNode(node) {
+ if (typeof node === "string") return node;
+ else return unwrapNode(node.props.children);
21
}
22
if (type === null) type = autoType.get(unwrapNode(children));
23
if (!type)
0 commit comments