From 05e9fbc104bfa586029882ede48a9fab8940bea4 Mon Sep 17 00:00:00 2001 From: DecDuck Date: Sat, 23 Aug 2025 17:09:32 +1000 Subject: [PATCH] fix: build issue with children --- src/components/Code.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Code.tsx b/src/components/Code.tsx index bba1f91..aab9103 100644 --- a/src/components/Code.tsx +++ b/src/components/Code.tsx @@ -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 }