From 86ef55c0f8af5d71f64d9fa0739373c02fd0e40d Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 17 Oct 2022 17:03:16 +1100 Subject: [PATCH 1/2] Send start event event even when there is no generator --- code/lib/core-server/src/dev-server.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/lib/core-server/src/dev-server.ts b/code/lib/core-server/src/dev-server.ts index f20b19a635c5..89f95bff4b59 100644 --- a/code/lib/core-server/src/dev-server.ts +++ b/code/lib/core-server/src/dev-server.ts @@ -80,11 +80,7 @@ export async function storybookDevServer(options: Options) { if (!core?.disableTelemetry) { initializedStoryIndexGenerator.then(async (generator) => { - if (!generator) { - return; - } - - const storyIndex = await generator.getIndex(); + const storyIndex = await generator?.getIndex(); const payload = storyIndex ? { storyIndex: { From 2abd0547a8fd251d9b61f0575d933a5823ce793b Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 17 Oct 2022 17:04:55 +1100 Subject: [PATCH 2/2] Same for `'build'` event --- code/lib/core-server/src/build-static.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/lib/core-server/src/build-static.ts b/code/lib/core-server/src/build-static.ts index 6bc5842b62a1..52bcb5eed7cd 100644 --- a/code/lib/core-server/src/build-static.ts +++ b/code/lib/core-server/src/build-static.ts @@ -168,11 +168,7 @@ export async function buildStaticStandalone( if (!core?.disableTelemetry) { effects.push( initializedStoryIndexGenerator.then(async (generator) => { - if (!generator) { - return; - } - - const storyIndex = await generator.getIndex(); + const storyIndex = await generator?.getIndex(); const payload = storyIndex ? { storyIndex: {