Ensure we don't fail if translation is disabled
ci/woodpecker/push/woodpecker Pipeline was successful Details
ci/woodpecker/pr/woodpecker Pipeline was successful Details

This commit is contained in:
FloatingGhost 2022-11-12 19:06:39 +00:00
parent c2a5a8c91f
commit 0770981a20
1 changed files with 6 additions and 2 deletions

View File

@ -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 },