diff options
-rw-r--r-- | packages/astro/src/core/render-context.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/astro/src/core/render-context.ts b/packages/astro/src/core/render-context.ts index dcce29f07..952c9c03b 100644 --- a/packages/astro/src/core/render-context.ts +++ b/packages/astro/src/core/render-context.ts @@ -532,18 +532,18 @@ export class RenderContext { : undefined; if (this.#currentLocale) { - return this.#currentLocale + return this.#currentLocale; } - + let computedLocale; if (routeData.pathname) { - computedLocale = computeCurrentLocale(routeData.pathname, locales, defaultLocale) + computedLocale = computeCurrentLocale(routeData.pathname, locales, defaultLocale); } else { - computedLocale = computeCurrentLocale(url.pathname, locales, defaultLocale) + computedLocale = computeCurrentLocale(url.pathname, locales, defaultLocale); } this.#currentLocale = computedLocale ?? fallbackTo; - - return this.#currentLocale + + return this.#currentLocale; } #preferredLocale: APIContext['preferredLocale']; |