From a3600dfd758df60287dd1fc36fb0f21cc4de9fc9 Mon Sep 17 00:00:00 2001 From: redphx <96280+redphx@users.noreply.github.com> Date: Wed, 22 May 2024 18:19:27 +0700 Subject: [PATCH] Fix not downloading translations when needed --- src/utils/translation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/translation.ts b/src/utils/translation.ts index ddd5613..f0783b5 100644 --- a/src/utils/translation.ts +++ b/src/utils/translation.ts @@ -317,7 +317,9 @@ export class Translations { try { Translations.#foreignTranslations = JSON.parse(window.localStorage.getItem(Translations.#KEY_TRANSLATIONS)!); - } catch(e) { + } catch(e) {} + + if (!Translations.#foreignTranslations) { await this.downloadTranslations(Translations.#selectedLocale); } }