mirror of
https://github.com/Drop-OSS/drop-api-docs.git
synced 2026-01-30 20:55:22 +01:00
fix: build issue with children
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user