瀏覽代碼

post MR fixes

Olivier Massot 1 年之前
父節點
當前提交
113baa96b6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      components/News/Details.vue

+ 2 - 2
components/News/Details.vue

@@ -128,11 +128,11 @@ const getImageUrl = (attachment: string | null): string | null => {
 }
 
 const formattedPublicationDate: ComputedRef<string> = computed(() => {
-  if (!newsItem || !newsItem.startPublication) {
+  if (!newsItem) {
     return ''
   }
 
-  const date = parseISO(newsItem.startPublication)
+  const date = parseISO(newsItem.startPublication!)
 
   let formattedPublicationDate = format(date, "'Le' dd MMMM yyyy", {
     locale: fr,