summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-12 18:06:52 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-04-12 18:06:52 -0300
commit6a238c37e002c9d8dcc51af2cb3dff44c900139c (patch)
treee014491076f1270e079195c64206a68d87e3dbc7 /app/helpers
parent2505dc46e7fa34fc874a35691385bc8f3e56837e (diff)
downloadgitlab-ce-fix-todo-target-path.tar.gz
Fix todo_target_path for todos where target was removedfix-todo-target-path
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/todos_helper.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb
index edc5686cf08..2f066682180 100644
--- a/app/helpers/todos_helper.rb
+++ b/app/helpers/todos_helper.rb
@@ -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?