diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 12:08:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-21 12:08:04 +0300 |
commit | 7379b60d2c1bdb0368908ecf99e270264d0eecd4 (patch) | |
tree | 3552171d6de340892e48fb6da96835081bce8bc8 /app/helpers/todos_helper.rb | |
parent | 8f306a7dc503ae0fed4acebc528f2bc2030dad83 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 41f39c7e798..15c602757a5 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -37,11 +37,12 @@ module TodosHelper end def todo_target_title(todo) - if todo.target - "\"#{todo.target.title}\"" - else - "" - end + # Design To Dos' filenames are displayed in `#todo_target_link` (see `Design#to_reference`), + # so to avoid displaying duplicate filenames in the To Do list for designs, + # we return an empty string here. + return "" if todo.target.blank? || todo.for_design? + + "\"#{todo.target.title}\"" end def todo_parent_path(todo) |