Fix todo_target_path for todos where target was removed

This commit is contained in:
Douglas Barbosa Alexandre 2016-04-12 18:06:52 -03:00
parent 2505dc46e7
commit 6a238c37e0
2 changed files with 4 additions and 0 deletions

View File

@ -59,6 +59,8 @@ class @Todos
goToTodoUrl: (e)->
todoLink = $(this).data('url')
return unless todoLink
if e.metaKey
e.preventDefault()
window.open(todoLink,'_blank')

View File

@ -20,6 +20,8 @@ module TodosHelper
end
def todo_target_path(todo)
return unless todo.target.present?
anchor = dom_id(todo.note) if todo.note.present?
if todo.for_commit?