diff --git a/viper.go b/viper.go index 50b478029..a89efe978 100644 --- a/viper.go +++ b/viper.go @@ -1826,7 +1826,7 @@ func mergeMaps( svType := reflect.TypeOf(sv) tvType := reflect.TypeOf(tv) - if svType != tvType { + if tvType != nil && svType != tvType { // Allow for the target to be nil jww.ERROR.Printf( "svType != tvType; key=%s, st=%v, tt=%v, sv=%v, tv=%v", sk, svType, tvType, sv, tv) diff --git a/viper_test.go b/viper_test.go index 45bf8e9ba..a5bbbd468 100644 --- a/viper_test.go +++ b/viper_test.go @@ -1695,6 +1695,7 @@ hello: pop: 37890 largenum: 765432101234567 num2pow63: 9223372036854775808 + universe: null world: - us - uk