forked from AkkomaGang/akkoma-fe
Ensure we don't fail if translation is disabled
This commit is contained in:
parent
c2a5a8c91f
commit
0770981a20
1 changed files with 6 additions and 2 deletions
|
@ -105,8 +105,12 @@ const GeneralTab = {
|
||||||
return this.$store.getters.mergedConfig.profileVersion
|
return this.$store.getters.mergedConfig.profileVersion
|
||||||
},
|
},
|
||||||
translationLanguages () {
|
translationLanguages () {
|
||||||
const langs = this.$store.state.instance.supportedTranslationLanguages || { source: [] }
|
const langs = this.$store.state.instance.supportedTranslationLanguages
|
||||||
return langs.source.map(lang => ({ key: lang.code, value: lang.code, label: lang.name }))
|
if (langs && langs.source) {
|
||||||
|
return langs.source.map(lang => ({ key: lang.code, value: lang.code, label: lang.name }))
|
||||||
|
}
|
||||||
|
|
||||||
|
return []
|
||||||
},
|
},
|
||||||
translationLanguage: {
|
translationLanguage: {
|
||||||
get: function () { return this.$store.getters.mergedConfig.translationLanguage },
|
get: function () { return this.$store.getters.mergedConfig.translationLanguage },
|
||||||
|
|
Loading…
Reference in a new issue