about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2017-03-31 22:44:12 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-03-31 22:45:56 +0200
commitd93d6f5124d7e120ad1542a65b72792e31f86b22 (patch)
tree90196b7c7111bded82c4dea814e3dcb1369d9fcb /app/services
parent7ddda65269cd5258deba530cfb4efc3343bb62ae (diff)
Fix reworked search
Diffstat (limited to 'app/services')
-rw-r--r--app/services/search_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/search_service.rb b/app/services/search_service.rb
index 159c03713..e9745010b 100644
--- a/app/services/search_service.rb
+++ b/app/services/search_service.rb
@@ -2,10 +2,10 @@
 
 class SearchService < BaseService
   def call(query, limit, resolve = false, account = nil)
-    return if query.blank?
-
     results = { accounts: [], hashtags: [], statuses: [] }
 
+    return results if query.blank?
+
     if query =~ /\Ahttps?:\/\//
       resource = FetchRemoteResourceService.new.call(query)