autocomplete: fix exception when type param is missing.

This commit is contained in:
evazion
2021-01-01 04:06:38 -06:00
parent 430ba5dced
commit 5b7894a8b2
2 changed files with 8 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ class AutocompleteService
def initialize(query, type, current_user: User.anonymous, limit: 10)
@query = query.to_s
@type = type.to_sym
@type = type.to_s.to_sym
@current_user = current_user
@limit = limit
end