瀏覽代碼

Fix account search with no query (#12549)

* Fix account search with no query

Modeled after #12541. Fix #12548

* fix codeclimate
master^2
trwnh 4 年之前
committed by Eugen Rochko
父節點
當前提交
1653ae91ce
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      app/services/account_search_service.rb

+ 2
- 2
app/services/account_search_service.rb 查看文件

@@ -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


Loading…
取消
儲存