added try catch as this call fails locally (#995)
This commit is contained in:
parent
5af816d369
commit
6f29839b06
1 changed files with 3 additions and 2 deletions
|
@ -73,14 +73,15 @@ export const LocalizationTab = ({
|
||||||
});
|
});
|
||||||
|
|
||||||
const loader = async () => {
|
const loader = async () => {
|
||||||
if (realm) {
|
try {
|
||||||
const result = await adminClient.realms.getRealmLocalizationTexts({
|
const result = await adminClient.realms.getRealmLocalizationTexts({
|
||||||
realm: realm.realm!,
|
realm: realm.realm!,
|
||||||
selectedLocale: getValues("defaultLocale") || "en",
|
selectedLocale: getValues("defaultLocale") || "en",
|
||||||
});
|
});
|
||||||
return Object.keys(result).map((key) => [key, result[key]]);
|
return Object.keys(result).map((key) => [key, result[key]]);
|
||||||
}
|
} catch (error) {
|
||||||
return [[]];
|
return [[]];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleModalToggle = () => {
|
const handleModalToggle = () => {
|
||||||
|
|
Loading…
Reference in a new issue