diff --git a/app/models/todos/undone_todos_query.rb b/app/models/todos/undone_todos_query.rb index 18a630ac..2ba2571c 100644 --- a/app/models/todos/undone_todos_query.rb +++ b/app/models/todos/undone_todos_query.rb @@ -27,7 +27,7 @@ module Todos if params[:tag] tag = Tag.where(:name => params[:tag]).first - if not tag + return [] if !tag return [] end not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id)