Skip to content

Commit

Permalink
simplify logic
Browse files Browse the repository at this point in the history
  • Loading branch information
RoryQ committed Sep 6, 2024
1 parent def32e6 commit 6adf672
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6adf672

Please sign in to comment.