ignore negative maxItems

This commit is contained in:
shamoon
2026-09-24 16:35:33 -07:00
parent 4b8c5a91e7
commit 8d4a76c5bf
2 changed files with 12 additions and 1 deletions
+2 -1
View File
@@ -51,7 +51,8 @@ export default async function feedProxyHandler(req, res) {
cache.put(cacheKey, items, CACHE_MS);
}
const maxItems = parseInt(widget.maxItems, 10) || 5;
const limit = parseInt(widget.maxItems, 10);
const maxItems = limit > 0 ? limit : 5;
const showImages = widget.images !== false && widget.images !== "false";
return res.status(200).json({