From 6adf672624872b627e5b083ffe39c0e8701f703f Mon Sep 17 00:00:00 2001 From: Rory Quinn Date: Fri, 6 Sep 2024 10:20:23 +1000 Subject: [PATCH] simplify logic --- chain.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/chain.go b/chain.go index e3eb8a9..37f23cb 100644 --- a/chain.go +++ b/chain.go @@ -94,10 +94,7 @@ func (c Chain) ResetCurrent(to ChainIssue) Chain { newChain.Current = to newChain.Items = []ChainItem{} for _, item := range c.Items { - item.IsCurrent = false - if item.ChainIssue.IsSame(to) { - item.IsCurrent = true - } + item.IsCurrent = item.ChainIssue.IsSame(to) newChain.Items = append(newChain.Items, item) } return newChain