fix: make it work with new vite

This commit is contained in:
Max Richter
2026-01-10 19:28:09 +01:00
parent 694feb083d
commit 8d712322c0
66 changed files with 590 additions and 1544 deletions

View File

@@ -61,7 +61,9 @@ export async function createRecommendationResource(
const d = typeof datePublished === "string"
? new Date(datePublished)
: datePublished;
resource.year = d.getFullYear();
if (!isNaN(d.getTime())) {
resource.year = d.getFullYear();
}
}
cache.set(cacheId, JSON.stringify(resource));