Commit 907a6138 authored by Jérome Perrin's avatar Jérome Perrin

graph_editor: support schemas where edges can not be edited

When no schema for the edge, don't try to show edge edition dialog. Until now
this was crashing
parent b9303c94
......@@ -505,7 +505,11 @@
var schema;
var fieldset_element;
var delete_promise;
schema = expandSchema(gadget.props.data.class_definition[edge_data._class], gadget.props.data);
var class_definition = gadget.props.data.class_definition[edge_data._class];
if (class_definition === undefined) {
return;
}
schema = expandSchema(class_definition, gadget.props.data);
// We do not edit source & destination on edge this way.
delete schema.properties.source;
delete schema.properties.destination;
......
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