fix root serialization

This commit is contained in:
Júlio César Batista 2023-02-18 12:20:28 -03:00
parent 51764057f1
commit 8105f02dc7
No known key found for this signature in database
GPG key ID: 10C4B861BF314878

View file

@ -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