From d85bb2d16f7a3501683a85d074470c353806d386 Mon Sep 17 00:00:00 2001 From: donglixiaoche Date: Tue, 28 Mar 2023 16:55:06 +0800 Subject: [PATCH] fix: cr, redundant code --- d2lib/d2.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/d2lib/d2.go b/d2lib/d2.go index 13dccad3f..11a1dd521 100644 --- a/d2lib/d2.go +++ b/d2lib/d2.go @@ -72,10 +72,6 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta // run core layout for constantNears for _, tempGraph := range constantNearGraphs { - if tempGraph == nil { - continue - } - nearObject := tempGraph.Root.ChildrenArray[0] nearObject.Parent = tempGraph.Root if err = coreLayout(ctx, tempGraph); err != nil {