Skip to content

Commit b24a54f

Browse files
authored
Merge pull request #539 from ronakj/next
Fix --index-json flag not being honored for locally deployed storybooks
2 parents 7b78185 + e3de87c commit b24a54f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test-storybook.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ const main = async () => {
362362
const { hostname } = new URL(targetURL);
363363

364364
const isLocalStorybookIp = await canBindToHost(hostname);
365-
const shouldRunIndexJson = runnerOptions.indexJson !== false && !isLocalStorybookIp;
365+
const shouldRunIndexJson =
366+
runnerOptions.indexJson === true || (runnerOptions.indexJson !== false && !isLocalStorybookIp);
366367
if (shouldRunIndexJson) {
367368
log(
368369
'Detected a remote Storybook URL, running in index json mode. To disable this, run the command again with --no-index-json\n'

0 commit comments

Comments
 (0)