From fe186b118c895a9b17ec717366712aad86d56447 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Fri, 4 Aug 2023 20:55:03 -0700 Subject: [PATCH] fix: fallback date --- src/_data/links.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/_data/links.js b/src/_data/links.js index a6358439..a0f2b989 100644 --- a/src/_data/links.js +++ b/src/_data/links.js @@ -15,7 +15,9 @@ module.exports = async function () { return { title: link['title'], url: link['source_url'], - date: new Date(link['published_date']), + date: link['published_date'] + ? new Date(link['published_date']) + : new Date(link['created_at']), summary: link['summary'], id: link['id'], }