fix: make it work with new vite
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user