Explorar o código

fix socialmeta on pages with no desc

George Baugh %!s(int64=3) %!d(string=hai) anos
pai
achega
2c41c2e850
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Trog/Routes/HTML.pm

+ 1 - 1
lib/Trog/Routes/HTML.pm

@@ -245,7 +245,7 @@ sub _build_social_meta ($query,$title) {
     $default_tags .= ','.join(',',@{$query->{primary_post}->{tags}}) if $default_tags && $query->{primary_post}->{tags};
 
     my $meta_desc  = $query->{primary_post}{data} // $Theme::description // "tCMS Site";
-    $meta_desc = Trog::Utils::strip_and_trunc($meta_desc);
+    $meta_desc = Trog::Utils::strip_and_trunc($meta_desc) || '';
 
     my $meta_tags = '';
     my $card_type = 'summary';