Don't render locale selector when there are no options (#27141)
Closes #27140 Signed-off-by: Peter Keuter <github@peterkeuter.nl>
This commit is contained in:
parent
f7e60b4338
commit
110b8714ab
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,9 @@ export const LocaleSelector = ({
|
||||||
key: locale,
|
key: locale,
|
||||||
value: localeToDisplayName(locale) || "",
|
value: localeToDisplayName(locale) || "",
|
||||||
}));
|
}));
|
||||||
|
if (!locales.length) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<FormProvider {...form}>
|
<FormProvider {...form}>
|
||||||
<SelectControl
|
<SelectControl
|
||||||
|
|
Loading…
Reference in a new issue