about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorabcang <abcang1015@gmail.com>2018-05-14 19:51:53 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-05-14 12:51:53 +0200
commit3793e598d0dd1b0db0c66ba1f35509dc8adf42c0 (patch)
tree7cb36b06d64a58e3a59dfc335a31b6deb19f4a6b /app
parent42a1231245410a74435db0342047a991e4c92109 (diff)
Call media.present? because media may be nil (#7474)
Diffstat (limited to 'app')
-rw-r--r--app/services/post_status_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb
index 8a1a120c3..7a3576e2d 100644
--- a/app/services/post_status_service.rb
+++ b/app/services/post_status_service.rb
@@ -22,7 +22,7 @@ class PostStatusService < BaseService
     media  = validate_media!(options[:media_ids])
     status = nil
     text   = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present?
-    text   = '.' if text.blank? && !media.empty?
+    text   = '.' if text.blank? && media.present?
 
     ApplicationRecord.transaction do
       status = account.statuses.create!(text: text,