Skip to content

Commit

Permalink
Fix typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Dec 14, 2022
1 parent 60ab7cf commit 8617bf5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/lib/csf-tools/src/CsfFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,10 @@ export class CsfFile {
if (isExportStory(key, self._meta)) {
const id = toId(self._meta.id || self._meta.title, storyNameFromExport(key));
const parameters: Record<string, any> = { ...story.parameters, __id: id };
const { includeStories } = self._meta || {};
if (
(entries.length === 1 || self._meta?.includeStories?.length === 1) &&
key === '__page'
key === '__page' &&
(entries.length === 1 || (Array.isArray(includeStories) && includeStories.length === 1))
) {
parameters.docsOnly = true;
}
Expand Down

0 comments on commit 8617bf5

Please sign in to comment.