Skip to content

Commit

Permalink
list: success on hitting 0 recursion depth
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel Odeke committed Jan 8, 2015
1 parent d7312f4 commit 7763102
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion list.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ func (g *Commands) breadthFirst(parentId, parent,

// A depth of < 0 means traverse as deep as you can
if depth == 0 {
return false
// At the end of the line, this was successful.
return true
}
if depth > 0 {
depth -= 1
Expand Down

0 comments on commit 7763102

Please sign in to comment.