fix: myriad typos and issues pt 2

This commit is contained in:
Cory Dransfeldt 2023-05-06 19:02:30 -07:00
parent be92f3bdf0
commit b0aa0d6948
No known key found for this signature in database
50 changed files with 120 additions and 69 deletions

View file

@ -39,6 +39,6 @@ module.exports = {
},
rssLastUpdatedDate: (collection) => {
if (!collection || !collection.length) return ''
return collection[0].publishedAt
return collection[0]['publishedAt']
},
}

View file

@ -16,8 +16,8 @@ module.exports = {
return marked.parse(content)
},
getFirstAttachment: (post) => {
if (post && post.attachments && post.attachments.length > 0) {
return post.attachments[0].url ? post.attachments[0].url : post.attachments[0]
if (post && post['attachments'] && post['attachments'].length > 0) {
return post['attachments'][0].url ? post['attachments'][0].url : post['attachments'][0]
}
return '/assets/img/social-card.png'

View file

@ -1,4 +1,4 @@
module.exports = (collection) => {
if (!collection || !collection.length) return ''
return collection[0].publishedAt
return collection[0]['publishedAt']
}