summaryrefslogtreecommitdiff
path: root/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb')
-rw-r--r--app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb b/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb
index f38c187799c..78a17312e26 100644
--- a/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb
+++ b/app/finders/autocomplete/acts_as_taggable_on/tags_finder.rb
@@ -22,8 +22,7 @@ module Autocomplete
end
def filter_by_name(tags)
- return tags unless search
- return tags.none if search.empty?
+ return tags unless search.present?
if search.length >= Gitlab::SQL::Pattern::MIN_CHARS_FOR_PARTIAL_MATCHING
tags.named_like(search)