Skip to content
Snippets Groups Projects
Commit 3793e598 authored by abcang's avatar abcang Committed by Eugen Rochko
Browse files

Call media.present? because media may be nil (#7474)

parent 42a12312
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment