Skip to content
Snippets Groups Projects
Commit 1653ae91 authored by a's avatar a Committed by Eugen Rochko
Browse files

Fix account search with no query (#12549)

* Fix account search with no query

Modeled after #12541. Fix #12548

* fix codeclimate
parent 0465d2a3
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,8 @@ class AccountSearchService < BaseService
attr_reader :query, :limit, :offset, :options, :account
def call(query, account = nil, options = {})
@acct_hint = query.start_with?('@')
@query = query.strip.gsub(/\A@/, '')
@acct_hint = query&.start_with?('@')
@query = query&.strip&.gsub(/\A@/, '')
@limit = options[:limit].to_i
@offset = options[:offset].to_i
@options = options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment