Skip to content

Commit

Permalink
fix: Do not add nodes with no label
Browse files Browse the repository at this point in the history
  • Loading branch information
ahtrotta committed Nov 29, 2023
1 parent bad6160 commit dc2cb01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/diagrams/src/componentDiagram/graph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default class Graph {

setNodeFromCodeObject(codeObject, parentId = null) {
let label = codeObject.prettyName;
if (!label) return;

if (codeObject.type === CodeObjectType.PACKAGE || codeObject.type === CodeObjectType.HTTP) {
const numChildren = codeObject.childLeafs().length;
Expand Down Expand Up @@ -133,6 +134,7 @@ export default class Graph {
}

render() {
console.log('this.graph.nodes(): ', this.graph);
dagre.layout(this.graph);

this.graph.nodes().forEach((id) => {
Expand Down

0 comments on commit dc2cb01

Please sign in to comment.