From e52cfeec8e0ba6c49acf168550647522feecf383 Mon Sep 17 00:00:00 2001 From: haim-kermany Date: Mon, 8 Jan 2024 13:09:57 +0200 Subject: [PATCH] code review --- pkg/drawio/subnetsLayout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/drawio/subnetsLayout.go b/pkg/drawio/subnetsLayout.go index cdecfd9cf..e87a39829 100644 --- a/pkg/drawio/subnetsLayout.go +++ b/pkg/drawio/subnetsLayout.go @@ -470,7 +470,7 @@ func (ly *subnetsLayout) calcZoneOrder() { for len(zonesScores) > 0 { zoneToAdd, addToRight, newZoneOrder := chooseZoneToAdd(zonesScores, zoneOrder) if newZoneOrder { - if zoneOrder != nil { + if len(zoneOrder) > 0 { zoneOrders = append(zoneOrders, zoneOrder) } zoneOrder = []TreeNodeInterface{}