From a5616be99c141bc72c6cba139bc4b07634cc1c20 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 30 Oct 2024 20:55:38 -0700 Subject: [PATCH] fix: filter --- 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 e23f2c76..131ad44b 100644 --- a/src/data/books.js +++ b/src/data/books.js @@ -48,7 +48,7 @@ export default async function () { const books = await fetchAllBooks(); const sortedByYear = sortBooksByYear(books); const booksForCurrentYear = - sortedByYear.find((yearGroup) => yearGroup.value === currentYear)?.data || + sortedByYear.find((yearGroup) => yearGroup.value === currentYear)?.data.filter(book => book['status'] === 'finished') || []; return {