We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aae73f5 commit a876c93Copy full SHA for a876c93
src/main/java/com/marginallyclever/nodegraphcore/Graph.java
@@ -378,6 +378,11 @@ public void updateBounds() {
378
379
public void fromJSON(JSONObject jo) throws JSONException {
380
clear();
381
+ // older files might be missing these values.
382
+ if(!jo.has("name")) jo.put("name",getName());
383
+ if(!jo.has("uniqueID")) jo.put("uniqueID",getUniqueID());
384
+ if(!jo.has("label")) jo.put("label", getLabel());
385
+ // proceed now that missing values are added.
386
super.fromJSON(jo);
387
parseAllNodesFromJSON(jo.getJSONArray("nodes"));
388
parseAllConnectionsFromJSON(jo.getJSONArray("connections"));
0 commit comments