From c2a0b08aa9ddaebf484fca79702fa78b379b8c3b Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 1 Nov 2023 18:58:13 -0700 Subject: [PATCH] fix: logic for books that haven't been started --- src/_data/books.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_data/books.js b/src/_data/books.js index 2d964929..bcb0c120 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -55,7 +55,7 @@ module.exports = async function () { 'https://books.coryd.dev' ) data[i]['url'] = `https://app.thestorygraph.com${urls[i].href}` - data[i]['percentage'] = percentages[i].textContent || '0%' + data[i]['percentage'] = percentages[i] ? percentages[i].textContent : '0%' data[i]['dateAdded'] = dates[i] ? new Date(dates[i].textContent.replace('Started ', '').split('\n')[0]) : new Date()