From 8105f02dc7c90c919d5618170c3ab8a32e479302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlio=20C=C3=A9sar=20Batista?= Date: Sat, 18 Feb 2023 12:20:28 -0300 Subject: [PATCH] fix root serialization --- d2graph/serde.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/d2graph/serde.go b/d2graph/serde.go index 1e1778577..e56e23f32 100644 --- a/d2graph/serde.go +++ b/d2graph/serde.go @@ -24,10 +24,10 @@ func DeserializeGraph(bytes []byte, g *Graph) error { return err } - g.Root = &Object{ - Graph: g, - Children: make(map[string]*Object), - } + var root Object + convert(sg.Root, &root) + g.Root = &root + root.Graph = g idToObj := make(map[string]*Object) idToObj[""] = g.Root