diff --git a/graph/ui-project-details/src/lib/target-configuration-details/target-configuration-details.util.ts b/graph/ui-project-details/src/lib/target-configuration-details/target-configuration-details.util.ts index 268c7337c78c7..edc3219c082c9 100644 --- a/graph/ui-project-details/src/lib/target-configuration-details/target-configuration-details.util.ts +++ b/graph/ui-project-details/src/lib/target-configuration-details/target-configuration-details.util.ts @@ -11,7 +11,7 @@ export function selectSourceInfo( // When the key is a prefix of the filter, we can record it as the root source. // Use the most specific key for the root "." source value. // e.g. `targets.build` takes precedence over `targets` - if (!rootKey || key.startsWith(rootKey)) { + if (!rootKey || key?.startsWith(rootKey)) { rootKey = key; rootSource = value; } diff --git a/graph/ui-tooltips/src/lib/sourcemap-info-tooltip.tsx b/graph/ui-tooltips/src/lib/sourcemap-info-tooltip.tsx index b83d32a829c08..3d44c2c490b69 100644 --- a/graph/ui-tooltips/src/lib/sourcemap-info-tooltip.tsx +++ b/graph/ui-tooltips/src/lib/sourcemap-info-tooltip.tsx @@ -20,7 +20,7 @@ export function SourcemapInfoToolTip({ // Every other property within in the target has the form `target.${targetName}.${propertyName} const isTarget = propertyKey.split('.').length === 2; - const docsUrlSlug: string | undefined = plugin.startsWith('@nx/') + const docsUrlSlug: string | undefined = plugin?.startsWith('@nx/') ? plugin.replace('@nx/', '').split('/')[0] : undefined;