From e8799132a6a8bf8924826016cbae908a8db64767 Mon Sep 17 00:00:00 2001 From: harlan Date: Fri, 30 Aug 2024 13:25:20 +1000 Subject: [PATCH] fix(i18n): broken trailing slashes config when using `differentDomains` Fixes #349 --- src/runtime/nitro/sitemap/builder/sitemap.ts | 2 +- test/integration/i18n/domains.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/nitro/sitemap/builder/sitemap.ts b/src/runtime/nitro/sitemap/builder/sitemap.ts index 1b2e42b5..dc614f85 100644 --- a/src/runtime/nitro/sitemap/builder/sitemap.ts +++ b/src/runtime/nitro/sitemap/builder/sitemap.ts @@ -214,7 +214,7 @@ export async function buildSitemapUrls(sitemap: SitemapDefinition, resolvers: Ni absolute: true, withBase: false, siteUrl: withHttps(domain), - trailingSlash: !_tester('/test/').endsWith('/'), + trailingSlash: _tester('/test/').endsWith('/'), base: '/', }) } diff --git a/test/integration/i18n/domains.test.ts b/test/integration/i18n/domains.test.ts index 86fd8edb..e240d8bb 100644 --- a/test/integration/i18n/domains.test.ts +++ b/test/integration/i18n/domains.test.ts @@ -57,14 +57,14 @@ describe('i18n domains', () => { " - https://fr.nuxtseo.com/fr/ + https://fr.nuxtseo.com/fr - https://fr.nuxtseo.com/fr/test/ + https://fr.nuxtseo.com/fr/test