Skip to content

Commit

Permalink
fix: respect query params when using i18nTransform (#245)
Browse files Browse the repository at this point in the history
Co-authored-by: long.tran <long.tran@linecorp.com>
  • Loading branch information
longhuubaotran and longhuubaotran committed Mar 8, 2024
1 parent d973bc7 commit 9d22f57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/nitro/sitemap/urlset/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ export function applyI18nEnhancements(_urls: ResolvedSitemapUrl[], options: Pick
if (!e._i18nTransform)
return e
delete e._i18nTransform
const path = withLeadingSlash(parseURL(e.loc).pathname)
const parsedURL = parseURL(e.loc)
const path = withLeadingSlash(parsedURL.pathname + parsedURL.search + parsedURL.hash)
const match = splitForLocales(path, autoI18n.locales.map(l => l.code))
let pathWithoutLocale = path
let locale
Expand Down

0 comments on commit 9d22f57

Please sign in to comment.