From d9aa637d4704aa97e0b1ae04255dfd336faca653 Mon Sep 17 00:00:00 2001 From: Maximilian Giller <m.giller@tu-bs.de> Date: Tue, 19 Jul 2022 00:36:16 +0200 Subject: [PATCH] Fixes previous commit to find similar types in parsing and fixes missing rename in addNodeType --- src/editor/js/structures/graph/graph.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/js/structures/graph/graph.ts b/src/editor/js/structures/graph/graph.ts index 9553a53..ebf36c2 100644 --- a/src/editor/js/structures/graph/graph.ts +++ b/src/editor/js/structures/graph/graph.ts @@ -179,7 +179,7 @@ export class Graph extends ManagedData { nodeType.color = "#000000"; } - this.data.types.push(node); + this.data.types.push(nodeType); this.triggerOnChange(); this.storeCurrentData("Added node [" + nodeType + "]"); @@ -444,7 +444,7 @@ export class Graph extends ManagedData { // TODO: Remove, when types are directly parsed and not just implicit data.nodes.forEach((node) => { const sharedType: NodeType = data.types.find((type) => - type.equals(node.type) + type.name === node.type.name || type.equals(node.type) ); if (sharedType !== undefined) { -- GitLab