Check for missing "target" in protograph link node's serialized json object when reloading from project files.

git-svn-id: http://google-refine.googlecode.com/svn/trunk@702 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
David Huynh 2010-05-10 20:49:45 +00:00
parent 2161255cdb
commit 60ef31012a

View File

@ -92,7 +92,8 @@ public class Protograph implements Jsonizable {
node2.addLink(new Link(
reconstructProperty(oLink.getJSONObject("property")),
reconstructNode(oLink.getJSONObject("target"))
oLink.has("target") && !oLink.isNull("target") ?
reconstructNode(oLink.getJSONObject("target")) : null
));
}
}