server: dont error on generating empty RSS feed

Changelog: Fixed
This commit is contained in:
Johann150 2023-02-18 17:43:27 +01:00
parent 0cf8f78e23
commit 3e9dd7957d
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -25,7 +25,7 @@ export default async function(user: User) {
const feed = new Feed({
id: author.link,
title: `${author.name} (@${user.username}@${config.host})`,
updated: notes[0].createdAt,
updated: notes[0]?.createdAt,
generator: 'FoundKey',
description: `${user.notesCount} Notes, ${profile.ffVisibility === 'public' ? user.followingCount : '?'} Following, ${profile.ffVisibility === 'public' ? user.followersCount : '?'} Followers${profile.description ? ` · ${profile.description}` : ''}`,
link: author.link,