1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 06:48:28 +09:00

Fix an error when a user tries to search nonexistent remote user (regression from #4275) (#4400)

This commit is contained in:
nullkal 2017-07-27 22:11:59 +09:00 committed by Eugen Rochko
parent f49339ca9c
commit 6654c30033

View File

@ -18,7 +18,7 @@ class AccountSearchService < BaseService
return [] if query_blank_or_hashtag? || limit < 1
if resolving_non_matching_remote_account?
[ResolveRemoteAccountService.new.call("#{query_username}@#{query_domain}")]
[ResolveRemoteAccountService.new.call("#{query_username}@#{query_domain}")].compact
else
search_results_and_exact_match.compact.uniq.slice(0, limit)
end