fix: guard against null entries
This commit is contained in:
parent
d43e7c8418
commit
d788b389d6
1 changed files with 1 additions and 0 deletions
|
@ -141,6 +141,7 @@ export default {
|
||||||
// feeds
|
// feeds
|
||||||
normalizeEntries: (entries) => {
|
normalizeEntries: (entries) => {
|
||||||
const posts = []
|
const posts = []
|
||||||
|
if (!entries.length) return posts
|
||||||
entries.forEach((entry) => {
|
entries.forEach((entry) => {
|
||||||
const dateKey = Object.keys(entry).find((key) => key.includes('date'))
|
const dateKey = Object.keys(entry).find((key) => key.includes('date'))
|
||||||
const date = new Date(entry[dateKey])
|
const date = new Date(entry[dateKey])
|
||||||
|
|
Reference in a new issue