0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00

[ci] format

This commit is contained in:
Emanuele Stoppa 2024-10-14 13:59:30 +00:00 committed by astrobot-houston
parent c351352360
commit d6f03e405d

View file

@ -532,18 +532,18 @@ export class RenderContext {
: undefined; : undefined;
if (this.#currentLocale) { if (this.#currentLocale) {
return this.#currentLocale return this.#currentLocale;
} }
let computedLocale; let computedLocale;
if (routeData.pathname) { if (routeData.pathname) {
computedLocale = computeCurrentLocale(routeData.pathname, locales, defaultLocale) computedLocale = computeCurrentLocale(routeData.pathname, locales, defaultLocale);
} else { } else {
computedLocale = computeCurrentLocale(url.pathname, locales, defaultLocale) computedLocale = computeCurrentLocale(url.pathname, locales, defaultLocale);
} }
this.#currentLocale = computedLocale ?? fallbackTo; this.#currentLocale = computedLocale ?? fallbackTo;
return this.#currentLocale return this.#currentLocale;
} }
#preferredLocale: APIContext['preferredLocale']; #preferredLocale: APIContext['preferredLocale'];