From 04483172d0bd881668f8f96984630184804fb70a Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Mon, 21 Aug 2023 18:38:14 +0300 Subject: [PATCH] fix(storybook): dont fail if targets dont exist (#18745) --- .../src/generators/configuration/lib/util-functions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/storybook/src/generators/configuration/lib/util-functions.ts b/packages/storybook/src/generators/configuration/lib/util-functions.ts index f16d33bf379b2..3150eb448e40e 100644 --- a/packages/storybook/src/generators/configuration/lib/util-functions.ts +++ b/packages/storybook/src/generators/configuration/lib/util-functions.ts @@ -371,7 +371,7 @@ export function updateLintConfig(tree: Tree, schema: StorybookConfigureSchema) { const { name: projectName } = schema; const { targets, root } = readProjectConfiguration(tree, projectName); - const tslintTargets = Object.values(targets).filter( + const tslintTargets = Object.values(targets ?? {}).filter( (target) => target.executor === '@angular-devkit/build-angular:tslint' );