Skip to content

Commit

Permalink
chore: Tidy up control flow
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Dec 26, 2023
1 parent 4c2aa8f commit f42337b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/chezmoi/sourcestatetreenode.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func (n *sourceStateEntryTreeNode) GetNode(targetRelPath RelPath) *sourceStateEn

node := n
for _, childRelPath := range targetRelPath.SplitAll() {
var ok bool
node, ok = node.children[childRelPath]
if !ok {
if childNode, ok := node.children[childRelPath]; ok {
node = childNode
} else {
return nil
}
}
Expand Down

0 comments on commit f42337b

Please sign in to comment.