From 0770981a2070ac1fe3078e03c8f2a526ade15752 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sat, 12 Nov 2022 19:06:39 +0000 Subject: [PATCH] Ensure we don't fail if translation is disabled --- src/components/settings_modal/tabs/general_tab.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/settings_modal/tabs/general_tab.js b/src/components/settings_modal/tabs/general_tab.js index 6e31366b..763a588d 100644 --- a/src/components/settings_modal/tabs/general_tab.js +++ b/src/components/settings_modal/tabs/general_tab.js @@ -105,8 +105,12 @@ const GeneralTab = { return this.$store.getters.mergedConfig.profileVersion }, translationLanguages () { - const langs = this.$store.state.instance.supportedTranslationLanguages || { source: [] } - return langs.source.map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) + const langs = this.$store.state.instance.supportedTranslationLanguages + if (langs && langs.source) { + return langs.source.map(lang => ({ key: lang.code, value: lang.code, label: lang.name })) + } + + return [] }, translationLanguage: { get: function () { return this.$store.getters.mergedConfig.translationLanguage },