Skip to content

Commit 16ba9c5

Browse files
committed
命名改善 (多分)
1 parent 3c01fe0 commit 16ba9c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/Term/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import autoType from "./auto-type.js";
1515
* @param {React.ReactNode} props.children
1616
*/
1717
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);
18+
function unwrapNode(node) {
19+
if (typeof node === "string") return node;
20+
else return unwrapNode(node.props.children);
2121
}
2222
if (type === null) type = autoType.get(unwrapNode(children));
2323
if (!type)

0 commit comments

Comments
 (0)