Skip to content

Commit

Permalink
Fix account search with no query (mastodon#12549)
Browse files Browse the repository at this point in the history
* Fix account search with no query

Modeled after mastodon#12541. Fix mastodon#12548

* fix codeclimate
  • Loading branch information
trwnh authored and Gargron committed Dec 6, 2019
1 parent 0465d2a commit 1653ae9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/account_search_service.rb
Expand Up @@ -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
Expand Down

0 comments on commit 1653ae9

Please sign in to comment.