]> cat aescling's git repositories - mastodon.git/commitdiff
Use .presence instead of ternary on site description for og: content (#2033)
authorMatt Jankowski <mjankowski@thoughtbot.com>
Mon, 17 Apr 2017 21:19:45 +0000 (17:19 -0400)
committerEugen <eugen@zeonfederated.com>
Mon, 17 Apr 2017 21:19:45 +0000 (23:19 +0200)
app/views/about/show.html.haml

index 39686b53160f7e5846aef4e4792ce8e6b0dfb926..60627ab98bfe2968176a2a7e0aa21d4b60f57f47 100644 (file)
@@ -8,7 +8,7 @@
   %meta{ property: 'og:site_name', content: site_title }/
   %meta{ property: 'og:type', content: 'website' }/
   %meta{ property: 'og:title', content: Rails.configuration.x.local_domain }/
-  %meta{ property: 'og:description', content: strip_tags(@instance_presenter.site_description.blank? ? t('about.about_mastodon') : @instance_presenter.site_description) }/
+  %meta{ property: 'og:description', content: strip_tags(@instance_presenter.site_description.presence || t('about.about_mastodon')) }/
   %meta{ property: 'og:image', content: asset_url('mastodon_small.jpg') }/
   %meta{ property: 'og:image:width', content: '400' }/
   %meta{ property: 'og:image:height', content: '400' }/