mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
[ci] format
This commit is contained in:
parent
c351352360
commit
d6f03e405d
1 changed files with 6 additions and 6 deletions
|
@ -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'];
|
||||||
|
|
Loading…
Reference in a new issue