Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rslibed committed Nov 20, 2024
1 parent 5c61347 commit fa17ffc
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ export default class LanguageSwitcher extends Widget {

if (!this.configurationSettings?.languageSwitcher) return;

const localeExists =
this.configurationSettings?.languageSwitcherConfig?.locales?.find(
(localeItem) => localeItem.locale === currentLocale
);
const locales =
this.configurationSettings?.languageSwitcherConfig?.locales ?? [];

const localeExists = locales.find(
(localeItem) => localeItem.locale === currentLocale
);

const defaultLocale =
this.configurationSettings?.languageSwitcherConfig?.defaultLocale;
Expand Down

0 comments on commit fa17ffc

Please sign in to comment.