fix: books feed

This commit is contained in:
Cory Dransfeldt 2024-06-15 09:02:19 -07:00
parent 84d17ce474
commit 6509a0607e
No known key found for this signature in database
3 changed files with 4 additions and 4 deletions

View file

@ -171,7 +171,7 @@ export default {
return `${allButLast} and ${last}`
},
bookStatus: (books, status) => books.filter(book => book.status === status),
bookSortDescending: (books) => books.sort((a, b) => {
bookSortDescending: (books) => books.filter(book => !isNaN(DateTime.fromISO(book.date).toMillis())).sort((a, b) => {
const dateA = DateTime.fromISO(a.date)
const dateB = DateTime.fromISO(b.date)
return dateB - dateA