Skip to content

Commit a269e44

Browse files
committed
Fix for no title case
1 parent 53e6ca6 commit a269e44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commands/utils/dom.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +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-
// kind parameter is not present in some cases
58-
let title = storyInfo.kind || storyInfo.title || '';
59-
filename = title.replaceAll('/', '#') + ': ' + storyInfo.name;
57+
let title = storyInfo.kind || storyInfo.title;
58+
title = title ? title.replaceAll('/', '#')+': ' : '';
59+
filename = title + storyInfo.name;
6060
form.append('files', file, filename+'.html');
6161
}
6262
form.append('resolution', storybookConfig.resolutions);

0 commit comments

Comments
 (0)