]> cat aescling's git repositories - mastodon.git/commitdiff
Fix an error when a user tries to search nonexistent remote user (regression from...
authornullkal <nullkal@users.noreply.github.com>
Thu, 27 Jul 2017 13:11:59 +0000 (22:11 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Thu, 27 Jul 2017 13:11:59 +0000 (15:11 +0200)
app/services/account_search_service.rb

index c266494f00f878107a62054afa0cf15b04e54c02..b0c663d020166cc3c48c3127576381a4d8dfa79f 100644 (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