Commit c19e9003 authored by Jérome Perrin's avatar Jérome Perrin

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

parent f3e4240b
......@@ -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