Commit 019c136e authored by Jérome Perrin's avatar Jérome Perrin Committed by Ioannis Papagiannopoulos

Graph Editor: make sure the edge have valid source & destination

parent 924e1bd8
......@@ -416,6 +416,14 @@
}]];
}
if (gadget.props.data.graph.node[edge_data.source] === undefined) {
throw new Error("Edge Source " + edge_data.source + " does not exist");
}
if (gadget.props.data.graph.node[edge_data.source] === undefined) {
throw new Error("Edge Destination " + edge_data.source
+ " does not exist");
}
// If an edge has this data:
// { _class: 'Edge',
// source: 'N1',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment