diff options
author | Bjørn Erik Pedersen <[email protected]> | 2016-08-10 22:46:02 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2016-09-06 18:32:20 +0300 |
commit | d8a256c155d23ad451625fcb292b297d85888c4c (patch) | |
tree | ed3e7218c7b819b31dc62bb177baa011cf6c61c9 /hugolib/multilingual.go | |
parent | 446e606a098aeacbaaf89a53c7addd33cd888a74 (diff) | |
download | hugo-d8a256c155d23ad451625fcb292b297d85888c4c.tar.gz hugo-d8a256c155d23ad451625fcb292b297d85888c4c.zip |
Fix YAML loading of multilingual config
And some other minor fixes from code review.
Updates #2309
Diffstat (limited to 'hugolib/multilingual.go')
-rw-r--r-- | hugolib/multilingual.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/multilingual.go b/hugolib/multilingual.go index c59b3b649..493a8e8a3 100644 --- a/hugolib/multilingual.go +++ b/hugolib/multilingual.go @@ -83,10 +83,10 @@ func toSortedLanguages(l map[string]interface{}) (helpers.Languages, error) { i := 0 for lang, langConf := range l { - langsMap, ok := langConf.(map[string]interface{}) + langsMap, err := cast.ToStringMapE(langConf) - if !ok { - return nil, fmt.Errorf("Language config is not a map: %v", langsMap) + if err != nil { + return nil, fmt.Errorf("Language config is not a map: %T", langConf) } language := helpers.NewLanguage(lang) |