Skip to content

Commit 53e6ca6

Browse files
authored
Merge pull request #33 from pinanks/fix-story-title
Fix story title
2 parents b72f30e + 43b2770 commit 53e6ca6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

commands/utils/dom.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ async function sendDoM(storybookUrl, stories, storybookConfig, options) {
5454
const form = new formData();
5555
for (const [storyId, storyInfo] of Object.entries(stories)) {
5656
const file = fs.readFileSync('doms/' + storyId + '.html');
57-
filename = storyInfo.kind.replaceAll('/', '#') + ': ' + storyInfo.name;
57+
// kind parameter is not present in some cases
58+
let title = storyInfo.kind || storyInfo.title || '';
59+
filename = title.replaceAll('/', '#') + ': ' + storyInfo.name;
5860
form.append('files', file, filename+'.html');
5961
}
6062
form.append('resolution', storybookConfig.resolutions);

0 commit comments

Comments
 (0)