diff --git a/src/main/java/com/metaweb/gridworks/protograph/Link.java b/src/main/java/com/metaweb/gridworks/protograph/Link.java index b162c998f..d67d2cc46 100644 --- a/src/main/java/com/metaweb/gridworks/protograph/Link.java +++ b/src/main/java/com/metaweb/gridworks/protograph/Link.java @@ -29,7 +29,10 @@ public class Link implements Jsonizable { writer.object(); writer.key("property"); property.write(writer, options); - writer.key("target"); target.write(writer, options); + if (target != null) { + writer.key("target"); + target.write(writer, options); + } writer.endObject(); } diff --git a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js index 06e2831dd..a09a4e7ff 100644 --- a/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js +++ b/src/main/webapp/scripts/protograph/schema-alignment-ui-link.js @@ -4,6 +4,9 @@ SchemaAlignmentDialog.UILink = function(dialog, link, table, options, parentUINo this._options = options; this._parentUINode = parentUINode; + // Make sure target node is there + this._link.target = this._link.target || { nodeType: "cell-as-value" } + this._tr = table.insertRow(table.rows.length); this._tdMain = this._tr.insertCell(0); this._tdToggle = this._tr.insertCell(1);