From 1df56853b5c1cabe2c37e712ac6c3da56aded01d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Fri, 17 Feb 2023 15:54:02 -0300 Subject: [PATCH] pr comment --- ci/release/changelogs/next.md | 2 +- d2graph/serde.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)] }