Checks for current_user when getting todo

This commit is contained in:
Phil Hughes 2016-06-17 09:10:23 +01:00
parent b56965c5bb
commit 7c95dc41ef

View file

@ -68,7 +68,7 @@ module IssuablesHelper
end
def issuable_todo(issuable)
if issuable
if current_user
current_user.todos.find_by(target: issuable, state: :pending)
end
end