fix: build issue with children

This commit is contained in:
DecDuck
2025-08-23 17:09:32 +10:00
parent 076447256e
commit 05e9fbc104

View File

@@ -142,7 +142,7 @@ function CodePanel({
label?: string
code?: string
}) {
let child = Children.only(children)
let child = Children.toArray(children).find((e) => isValidElement(e));
if (isValidElement(child)) {
const props = child.props as { tag?: string; label?: string; code?: string }