]> cat aescling's git repositories - mastodon.git/commitdiff
Fix admin actions log crash when displaying updates of deleted announcements (#13489)
authorThibG <thib@sitedethib.com>
Fri, 17 Apr 2020 17:54:58 +0000 (19:54 +0200)
committerGitHub <noreply@github.com>
Fri, 17 Apr 2020 17:54:58 +0000 (19:54 +0200)
Fixes #13487

app/helpers/admin/action_logs_helper.rb

index 88d6e4580d3250eb58cc930094a692a137b5ff3e..8e398c3b2696271d3f2e8ebe1f70d0e33369c13f 100644 (file)
@@ -47,7 +47,7 @@ module Admin::ActionLogsHelper
         I18n.t('admin.action_logs.deleted_status')
       end
     when 'Announcement'
-      truncate(attributes['text'])
+      truncate(attributes['text'].is_a?(Array) ? attributes['text'].last : attributes['text'])
     end
   end
 end