diff --git a/src/editor/js/structures/graph/link.ts b/src/editor/js/structures/graph/link.ts index c0345c916bab74fa4570b667f21245109dfbf395..b0eac9ba382f85b36c0fc1588c0fae26ab6505b3 100644 --- a/src/editor/js/structures/graph/link.ts +++ b/src/editor/js/structures/graph/link.ts @@ -96,8 +96,8 @@ export class Link extends GraphElement { public static parse(raw: any): Link { const link: Link = new Link(); - link.sourceId = raw.source; - link.targetId = raw.target; + link.sourceId = Number(raw.source); + link.targetId = Number(raw.target); return link; } diff --git a/src/editor/js/structures/graph/node.ts b/src/editor/js/structures/graph/node.ts index dd67fe0682ec8a82693abe991b2b3bced130bfb6..6e1cc01cb22db542cd7c859021326093737511e0 100644 --- a/src/editor/js/structures/graph/node.ts +++ b/src/editor/js/structures/graph/node.ts @@ -94,7 +94,7 @@ export class Node extends GraphElement { public static parse(raw: any): Node { const node: Node = new Node(); - node.id = raw.id; + node.id = Number(raw.id); node.label = raw.name; node.description = raw.description; node.type = NodeType.parse(raw.type);