diff --git a/lib/settings/yml/yml.go b/lib/settings/yml/yml.go index 9f277989..149409ac 100644 --- a/lib/settings/yml/yml.go +++ b/lib/settings/yml/yml.go @@ -52,6 +52,9 @@ func (config *Yaml) SetMulti(data map[string]interface{}) error { return config.write() } func (config *Yaml) Register(settings ...interface{}) error { + if config.data == nil { + config.data = map[string]interface{}{} + } for _, s := range settings { var v = generic.Parse(s) if !v.Is("settings.Setting") {