about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--app/models/status.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index 8df4ab100..ff37f2bd8 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -345,6 +345,7 @@ class Status < ApplicationRecord
       else
         scope = Status
       end
+      return none if term.blank?
       pattern = sanitize_sql_like(term)
       pattern = "#{pattern}"
       scope = scope.without_reblogs.where("tsv @@ plainto_tsquery('english', ?)", pattern)