Fix RSS feed to handle nullable descriptions

The description field in blog/project schemas can be null,
causing RSS generation to fail. Added fallback to empty string.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Neeldhara Misra 2026-02-20 14:17:20 +05:30
parent 81cca50f34
commit e955c3cf31

View file

@ -19,7 +19,7 @@ export async function GET(context) {
site: context.site,
items: items.map((item) => ({
title: item.data.title,
description: item.data.description,
description: item.data.description ?? "",
pubDate: item.data.date,
link: `/${item.collection}/${item.id}/`,
})),