From 76464d16a6209b8a60a8a2067c2942594ced06e8 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Mon, 21 Aug 2023 17:52:32 +0300 Subject: [PATCH] fix(storybook): dont fail if targets dont exist --- .../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' );