Просмотр исходного кода

fix socialmeta on pages with no desc

George Baugh 3 лет назад
Родитель
Сommit
2c41c2e850
1 измененных файлов с 1 добавлено и 1 удалено
  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';