]> cat aescling's git repositories - mastodon.git/commitdiff
Fix admin interface crashing when listing boosts with non-video media attachments...
authorThibG <thib@sitedethib.com>
Mon, 20 Jan 2020 16:39:14 +0000 (17:39 +0100)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 20 Jan 2020 16:39:14 +0000 (17:39 +0100)
Fix regression introduced by #12879

app/views/admin/reports/_status.html.haml

index 105352e46136a115ec7661db1333fdb2a27b35be..fa15796d280b9aad6303d351cd4459ec30132ba4 100644 (file)
@@ -15,7 +15,7 @@
       - if status.proper.media_attachments.first.video?
         - video = status.proper.media_attachments.first
         = react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.proper.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description
-      - elsif status.media_attachments.first.audio?
+      - elsif status.proper.media_attachments.first.audio?
         - audio = status.proper.media_attachments.first
         = react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration)
       - else