Skip to content

Commit

Permalink
AO3-6783 Minor review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 committed Aug 4, 2024
1 parent 82f63ca commit f80eb52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/autocomplete_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def noncanonical_tag
raise "Redshirt: Attempted to constantize invalid class initialize noncanonical_tag #{params[:type].classify}" unless Tag::TYPES.include?(params[:type].classify)

tag_class = params[:type].classify.constantize
one_tag = tag_class.find_by(canonical: false, name: params[:term])
one_tag = tag_class.find_by(canonical: false, name: params[:term]) if params[:term].present?
# If there is an exact match in the database, ensure it is the first thing suggested.
match = if one_tag && params[:term].present?
match = if one_tag
[one_tag.name]
else
[]
Expand Down
2 changes: 1 addition & 1 deletion features/tag_sets/tag_set_nominations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Feature: Nominating and reviewing nominations for a tag set
But I should not see "Gold"
And I should see "None nominated in this fandom."

Scenario: A tag nomination with for the zero width space tag doesn't prevent removing other tag nominations
Scenario: A tag nomination with the zero width space tag doesn't prevent removing other tag nominations
Given a canonical fandom "First"
And a canonical fandom "Treasure Chest"
And a zero width space tag exists
Expand Down

0 comments on commit f80eb52

Please sign in to comment.