We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5d33fe commit 44d87c3Copy full SHA for 44d87c3
.storybook/createMetadata.js
@@ -22,7 +22,9 @@ const main = async () => {
22
23
dirContents.forEach(async file => {
24
const contents = require(path.join(STORIES_PATH, file))
25
- stories[contents.default.title] = Object.keys(contents).filter(key => key !== 'default')
+ if (contents.default) {
26
+ stories[contents.default.title] = Object.keys(contents).filter(key => key !== 'default')
27
+ }
28
})
29
30
fs.writeFileSync(METADATA_FILEPATH, JSON.stringify(stories), 'utf8')
0 commit comments