chore: missing return

This commit is contained in:
Stephen Zhou
2024-10-14 12:37:51 +08:00
parent 5b9ee0a622
commit 7ef68282ce
+1 -1
View File
@@ -191,7 +191,7 @@ export const parseHtml = (
language = children.props.className.replace("language-", "")
}
const code = "props" in children && children.props.children
if (!code) createElement("pre", props, props.children)
if (!code) return createElement("pre", props, props.children)
try {
codeString = extractCodeFromHtml(renderToString(code))