fix build error; nav active state

This commit is contained in:
Cory Dransfeldt 2023-03-14 10:07:18 -07:00
parent 1d1bb8f37a
commit 063ed23406
No known key found for this signature in database
4 changed files with 11 additions and 6 deletions

View file

@ -36,9 +36,10 @@ module.exports = {
return author.name && published && content
}
const filtered = webmentions
.filter((entry) => entry['wm-target'] === `https://coryd.dev${url}`)
.filter((entry) => allowedTypes.includes(entry['wm-property']))
const filtered =
webmentions
?.filter((entry) => entry['wm-target'] === `https://coryd.dev${url}`)
.filter((entry) => allowedTypes.includes(entry['wm-property'])) || []
filtered.forEach((m) => {
if (data[m['wm-property']]) {