fix: guard against null entries

This commit is contained in:
Cory Dransfeldt 2024-05-13 17:46:46 -07:00
parent d43e7c8418
commit d788b389d6
No known key found for this signature in database

View file

@ -141,6 +141,7 @@ export default {
// feeds
normalizeEntries: (entries) => {
const posts = []
if (!entries.length) return posts
entries.forEach((entry) => {
const dateKey = Object.keys(entry).find((key) => key.includes('date'))
const date = new Date(entry[dateKey])