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:
parent
81cca50f34
commit
e955c3cf31
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ export async function GET(context) {
|
||||||
site: context.site,
|
site: context.site,
|
||||||
items: items.map((item) => ({
|
items: items.map((item) => ({
|
||||||
title: item.data.title,
|
title: item.data.title,
|
||||||
description: item.data.description,
|
description: item.data.description ?? "",
|
||||||
pubDate: item.data.date,
|
pubDate: item.data.date,
|
||||||
link: `/${item.collection}/${item.id}/`,
|
link: `/${item.collection}/${item.id}/`,
|
||||||
})),
|
})),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue