Skip to content
Snippets Groups Projects
Commit 00ac7f7b authored by Maximilian Giller's avatar Maximilian Giller
Browse files

Allowed node-ids to be parsed as strings as fallback

parent 7c62a009
No related branches found
No related tags found
1 merge request!2Implemented editor in the react framework
Pipeline #56557 failed
......@@ -99,6 +99,13 @@ export class Link extends GraphElement {
link.sourceId = Number(raw.source);
link.targetId = Number(raw.target);
// Ids successfully parsed as numbers?
if (isNaN(link.sourceId) || isNaN(link.targetId)) {
// No, fallback to string ids
link.sourceId = raw.source;
link.targetId = raw.target;
}
return link;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment