Skip to content

Commit c066610

Browse files
committedJul 26, 2024·
fix: handle null loc's
1 parent 295c98f commit c066610

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/runtime/nitro/sitemap/urlset/normalise.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function preNormalizeEntry(_e: SitemapUrl | string): ResolvedSitemapUrl {
3434
delete e.url
3535
}
3636
// we want a uniform loc so we can dedupe using it, remove slashes and only get the path
37-
e.loc = removeTrailingSlash(e.loc)
37+
e.loc = removeTrailingSlash(e.loc || '')
3838
e._abs = hasProtocol(e.loc, { acceptRelative: false, strict: false })
3939
try {
4040
e._path = e._abs ? parseURL(e.loc) : parsePath(e.loc)

0 commit comments

Comments
 (0)
Please sign in to comment.