fix: cr, redundant code

This commit is contained in:
donglixiaoche 2023-03-28 16:55:06 +08:00
parent 3d45f6ab51
commit d85bb2d16f
No known key found for this signature in database
GPG key ID: 3190E65EBAD6D6E2

View file

@ -72,10 +72,6 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta
// run core layout for constantNears // run core layout for constantNears
for _, tempGraph := range constantNearGraphs { for _, tempGraph := range constantNearGraphs {
if tempGraph == nil {
continue
}
nearObject := tempGraph.Root.ChildrenArray[0] nearObject := tempGraph.Root.ChildrenArray[0]
nearObject.Parent = tempGraph.Root nearObject.Parent = tempGraph.Root
if err = coreLayout(ctx, tempGraph); err != nil { if err = coreLayout(ctx, tempGraph); err != nil {