Skip to content

Commit

Permalink
fix: Fix rendering when there is no component
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Jun 4, 2020
1 parent 4397c34 commit aad5354
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/templates/ReferenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ const ReferenceTemplate = ({ data }) => {
const { mdx } = data;
const { frontmatter } = mdx;
const { title, description, component } = frontmatter;
const componentDoc = useComponentDoc(component);

const {
examples,
examples = [],
description: componentDescription,
methods,
usage,
} = useComponentDoc(component);
methods = [],
usage = '',
} = componentDoc ?? {};

return (
<Layout>
Expand Down

0 comments on commit aad5354

Please sign in to comment.