Fixed a bug in which if the target of a protograph link was somehow missing, the project.html wouldn't load.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@665 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-05-09 19:35:42 +00:00
parent fd61c4b9e4
commit 9fa9401ccb
2 changed files with 7 additions and 1 deletions

View File

@ -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();
}

View File

@ -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);