Skip to content

Commit

Permalink
Addon-docs: Hide stories block when there are no stories (#9271)
Browse files Browse the repository at this point in the history
Addon-docs: Hide stories block when there are no stories
  • Loading branch information
shilman authored Dec 30, 2019
2 parents 0870b23 + 0efb742 commit 608cdbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/docs/src/blocks/Stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const Stories: FunctionComponent<StoriesProps> = ({ slot, title }) => {
const stories: DocsStoryProps[] = slot
? slot(componentStories, context)
: componentStories && componentStories.slice(1);
if (!stories) {
if (!stories || stories.length === 0) {
return null;
}
return (
Expand Down

0 comments on commit 608cdbf

Please sign in to comment.