Skip to content

Commit

Permalink
Addon-docs: Fix Description block when no component provided (#8902)
Browse files Browse the repository at this point in the history
Addon-docs: Fix Description block when no component provided
  • Loading branch information
shilman authored Nov 21, 2019
2 parents 87e705d + 723f27f commit a2a6b9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/docs/src/lib/docgen/extractDocgenProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ function extractProp(
return null;
}

export function extractComponentDescription(component: Component): string {
return getDocgenDescription(component);
export function extractComponentDescription(component?: Component): string {
return !isNil(component) && getDocgenDescription(component);
}

1 comment on commit a2a6b9d

@vercel
Copy link

@vercel vercel bot commented on a2a6b9d Nov 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.