Skip to content

Commit

Permalink
fix: codegroup assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Mar 31, 2024
1 parent 7470350 commit d3de99d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-plums-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vocs": patch
---

Added assertion to `CodeGroup`.
1 change: 1 addition & 0 deletions src/app/components/mdx/CodeGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as Tabs from '../Tabs.js'
import * as styles from './CodeGroup.css.js'

export function CodeGroup({ children }: { children: ReactElement[] }) {
if (!Array.isArray(children)) return null
const tabs = children.map((child_) => {
const child = child_.props['data-title'] ? child_ : child_.props.children
const { props } = child
Expand Down

0 comments on commit d3de99d

Please sign in to comment.