From 6f29839b0620cf075a3e4cabf45b48cac818417b Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Thu, 12 Aug 2021 10:56:25 +0200 Subject: [PATCH] added try catch as this call fails locally (#995) --- src/realm-settings/LocalizationTab.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/realm-settings/LocalizationTab.tsx b/src/realm-settings/LocalizationTab.tsx index cf36c745e7..7c952dad9e 100644 --- a/src/realm-settings/LocalizationTab.tsx +++ b/src/realm-settings/LocalizationTab.tsx @@ -73,14 +73,15 @@ export const LocalizationTab = ({ }); const loader = async () => { - if (realm) { + try { const result = await adminClient.realms.getRealmLocalizationTexts({ realm: realm.realm!, selectedLocale: getValues("defaultLocale") || "en", }); return Object.keys(result).map((key) => [key, result[key]]); + } catch (error) { + return [[]]; } - return [[]]; }; const handleModalToggle = () => {