Feed parser: Check for empty descriptions too

pull/1/head
Starbeamrainbowlabs 2021-10-10 17:05:05 +01:00
parent e0ee4c19a3
commit 0d7cab6dd0
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
1 changed files with 3 additions and 2 deletions

View File

@ -48,8 +48,9 @@ module.exports = async function() {
item.content = item.content.text;
}
if(!item.description) item.description = striptags(item.content)
.substr(0, DESCRIPTION_LENGTH);
if(!item.description
|| (typeof item.description == "string" && item.description.length === 0)) item.description = striptags(item.content)
.substr(0, DESCRIPTION_LENGTH);
if(!item.pubdate) item.pubdate = item.published
|| item.updated