web: fix locale loading being skipped (#9301)

Fix locale loading being skipped.

Co-authored-by: Dylan Kauling <dkauling@armstrongfluidtechnology.com>
This commit is contained in:
Dylan Kauling
2024-04-16 18:35:35 -04:00
committed by GitHub
parent 5bbf59b2bd
commit 4544f475c9

View File

@ -88,7 +88,7 @@ export class LocaleContext extends LitElement {
}
locale.locale().then(() => {
console.debug(`authentik/locale: Loaded locale '${code}'`);
if (this.getLocale() === code) {
if (this.getLocale() === requestedLocale) {
return;
}
console.debug(`Setting Locale to ... ${locale.label()} (${locale.code})`);