Compare commits

...

1 commit

Author SHA1 Message Date
Andrew Stuart
f69c91abd3
Fix nil pointer on watch function (#568) 2018-09-28 01:06:43 -07:00

View file

@ -306,7 +306,9 @@ func (v *Viper) WatchConfig() {
if err != nil {
log.Println("error:", err)
}
v.onConfigChange(event)
if v.onConfigChange != nil {
v.onConfigChange(event)
}
}
}
case err := <-watcher.Errors: