3
0

Prevent boot levels from panicking if default language not set

This commit is contained in:
Tomaž Jerman 2022-07-18 18:03:18 +02:00
parent 56a7bfa821
commit aaa536441b

View File

@ -679,7 +679,10 @@ func updateLocaleSettings(opt options.LocaleOpt) {
} else {
// when resource translation is disabled,
// add only default (first) language to the list
out = append(out, locale.Global().Default().Tag.String())
def := locale.Global().Default()
if def != nil {
out = append(out, def.Tag.String())
}
}
appSettings.ResourceTranslations.Languages = out