From 856ff463ae4f355b5646878dfa6b4bce09848bb0 Mon Sep 17 00:00:00 2001 From: nscuro Date: Wed, 9 Oct 2024 15:40:59 +0200 Subject: [PATCH] Always display project nodes in dependency graph using name and version Fixes #1026 Signed-off-by: nscuro --- src/views/portfolio/projects/ProjectDependencyGraph.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/portfolio/projects/ProjectDependencyGraph.vue b/src/views/portfolio/projects/ProjectDependencyGraph.vue index 0fd78df8b..bc7d14033 100644 --- a/src/views/portfolio/projects/ProjectDependencyGraph.vue +++ b/src/views/portfolio/projects/ProjectDependencyGraph.vue @@ -529,10 +529,12 @@ export default { } }, createNodeLabel: function (identity) { - // could be a project or a component - if (identity.purlCoordinates) { + // Could be a project or a directDependency object. + // Projects don't have the objectType property. + const isProject = !identity.objectType; + if (!isProject && identity.purlCoordinates) { return identity.purlCoordinates; - } else if (identity.purl) { + } else if (!isProject && identity.purl) { return identity.purl; } else { let label = '';