Skip to content

Commit

Permalink
Merge pull request #210 from lightingbeetle/fix/mdx-language
Browse files Browse the repository at this point in the history
prevent error when no mdx language is defined
  • Loading branch information
jurajk authored Mar 4, 2020
2 parents bd632ae + bc5e23d commit 0e9a282
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/styleguide/src/components/MDX/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const MDXComponents = {
inlineCode: props => <Code {...props} />,
code: props => (
<CodeBlock
language={props.className && props.className.replace(/language-/, '')}
language={props.className?.replace(/language-/, '')}
{...props}
/>
),
Expand Down

0 comments on commit 0e9a282

Please sign in to comment.