chore: make mapped var name clearer

This commit is contained in:
Cory Dransfeldt 2023-04-26 17:41:30 -07:00
parent 39b34ec90c
commit 64085621b7

View file

@ -9,7 +9,7 @@ module.exports = async function () {
getExtraEntryFields: (feedEntry) => { getExtraEntryFields: (feedEntry) => {
const images = feedEntry['description']?.match(/<img [^>]*src="[^"]*"[^>]*>/gm) || [] const images = feedEntry['description']?.match(/<img [^>]*src="[^"]*"[^>]*>/gm) || []
return { return {
image: images.length ? images.map((x) => x.replace(/.*src="([^"]*)".*/, '$1'))[0] : '', image: images.length ? images.map((image) => image.replace(/.*src="([^"]*)".*/, '$1'))[0] : '',
} }
}, },
}).catch((error) => { }).catch((error) => {