From 91546e98337b652c46e329fe858f4896d5fed206 Mon Sep 17 00:00:00 2001 From: elielnfinic <46634774+elielnfinic@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:28:55 +0200 Subject: [PATCH] Cleaning the code --- packages/object/src/hashgraph/index.ts | 5 ++--- packages/object/src/index.ts | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/object/src/hashgraph/index.ts b/packages/object/src/hashgraph/index.ts index 8e76851f..ba269009 100644 --- a/packages/object/src/hashgraph/index.ts +++ b/packages/object/src/hashgraph/index.ts @@ -128,9 +128,8 @@ export class HashGraph { if ( !deps.every((dep) => this.forwardEdges.has(dep) || this.vertices.has(dep)) ) { - const error = new Error("Invalid dependency detected."); - error.name = "InvalidDependencyError"; - throw error; + console.error("Invalid dependency detected."); + return ""; } const vertex: Vertex = { diff --git a/packages/object/src/index.ts b/packages/object/src/index.ts index 4a0efc40..0e5473cd 100644 --- a/packages/object/src/index.ts +++ b/packages/object/src/index.ts @@ -103,6 +103,7 @@ export class TopologyObject implements ITopologyObject { if (!vertex.operation) { continue; } + this.hashGraph.addVertex( vertex.operation, vertex.dependencies,