Skip to content

Commit

Permalink
Update lib/ui/src/components/sidebar/Sidebar.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien committed Jan 28, 2022
1 parent 4f37e6a commit 76ad114
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/ui/src/components/sidebar/Sidebar.tsx
Expand Up @@ -109,10 +109,14 @@ export const Sidebar: FunctionComponent<SidebarProps> = React.memo(
if (DOCS_MODE) {
return Object.keys(refs).reduce((acc: Refs, cur) => {
const ref = refs[cur];
acc[cur] = {
...ref,
stories: collapseDocsOnlyStories(ref.stories),
};
if (ref.stories) {
acc[cur] = {
...ref,
stories: collapseDocsOnlyStories(ref.stories),
};
} else {
acc[cur] = ref;
}
return acc;
}, {});
}
Expand Down

0 comments on commit 76ad114

Please sign in to comment.