Skip to content

Commit

Permalink
Fix tag controller "suggested tags" action publiclab#2458
Browse files Browse the repository at this point in the history
  • Loading branch information
yashbth authored Mar 9, 2018
1 parent 75db6c9 commit d4db40e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/tag_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def delete
end

def suggested
if params[:id].length > 2
if !params[:id].empty? && params[:id].length > 2
@suggestions = []
# filtering out tag spam by requiring tags attached to a published node
Tag.where('name LIKE ?', '%' + params[:id] + '%')
Expand Down

0 comments on commit d4db40e

Please sign in to comment.