Skip to content

Commit

Permalink
fix: don't show languageSwitcher if there are no locales
Browse files Browse the repository at this point in the history
  • Loading branch information
bcree11 committed Sep 27, 2024
1 parent d867d5b commit 4a19a16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functionality/esriWidgetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export async function addLanguageSwitcher(
const uniqueId = "esri-language-switcher";
let node = view.ui.find(uniqueId) as __esri.Expand;

if (!languageSwitcher) {
if (!languageSwitcher || !languageSwitcherConfig?.locales?.length) {
if (node) view.ui.remove(node);
return;
}
Expand Down

0 comments on commit 4a19a16

Please sign in to comment.