diff --git a/src/runtime/sitemap/builder/sitemap.ts b/src/runtime/sitemap/builder/sitemap.ts index 9490fab5..0213156d 100644 --- a/src/runtime/sitemap/builder/sitemap.ts +++ b/src/runtime/sitemap/builder/sitemap.ts @@ -73,7 +73,7 @@ export async function buildSitemap(sitemap: SitemapDefinition, resolvers: NitroU // 1. normalise const normalisedUrls = normaliseSitemapUrls(resolvedSources.map(e => e.urls).flat(), resolvers) // 2. enhance - const defaults = sitemap.defaults + const defaults = { ...(sitemap.defaults || {}) } if (autoLastmod && defaults?.lastmod) defaults.lastmod = new Date()