Skip to content

Commit

Permalink
Fix next command
Browse files Browse the repository at this point in the history
  • Loading branch information
naoty committed Dec 21, 2017
1 parent 3957a0e commit e15c494
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion command/next.go
Expand Up @@ -35,7 +35,11 @@ func nextTodoFromTodos(todos []todo.Todo) (todo.Todo, bool) {
}

if len(todo.Todos) > 0 {
return nextTodoFromTodos(todo.Todos)
subtodo, found := nextTodoFromTodos(todo.Todos)
if found {
return subtodo, true
}
return todo, true
}

return todo, true
Expand Down

0 comments on commit e15c494

Please sign in to comment.