diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 46f11dc1c..acd76b3fc 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -13,4 +13,4 @@ - Fixes rare compiler bug when using underscores in edges to create objects across containers. [#824](https://github.com/terrastruct/d2/pull/824) - Fixes rare possibility of rendered connections being hidden or cut off. [#828](https://github.com/terrastruct/d2/pull/828) - Creating nested children within `sql_table` and `class` shapes are now prevented (caused confusion when accidentally done). [#834](https://github.com/terrastruct/d2/pull/834) -- Fixes graph deserialization. [#837](https://github.com/terrastruct/d2/pull/837) \ No newline at end of file +- Fixes graph deserialization bug. [#837](https://github.com/terrastruct/d2/pull/837) \ No newline at end of file diff --git a/d2graph/serde.go b/d2graph/serde.go index 6b46a2697..1e1778577 100644 --- a/d2graph/serde.go +++ b/d2graph/serde.go @@ -49,7 +49,7 @@ func DeserializeGraph(bytes []byte, g *Graph) error { for _, id := range so["ChildrenArray"].([]interface{}) { o := idToObj[id.(string)] childrenArray = append(childrenArray, o) - children[strings.ToLower(o.IDVal)] = o + children[strings.ToLower(o.ID)] = o o.Parent = idToObj[so["AbsID"].(string)] }