Skip to content

Commit

Permalink
fix: handle null loc's
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Jul 26, 2024
1 parent 295c98f commit c066610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/nitro/sitemap/urlset/normalise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function preNormalizeEntry(_e: SitemapUrl | string): ResolvedSitemapUrl {
delete e.url
}
// we want a uniform loc so we can dedupe using it, remove slashes and only get the path
e.loc = removeTrailingSlash(e.loc)
e.loc = removeTrailingSlash(e.loc || '')
e._abs = hasProtocol(e.loc, { acceptRelative: false, strict: false })
try {
e._path = e._abs ? parseURL(e.loc) : parsePath(e.loc)
Expand Down

0 comments on commit c066610

Please sign in to comment.