aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/mitchellh/mapstructure/decode_hooks.go')
-rw-r--r--vendor/github.com/mitchellh/mapstructure/decode_hooks.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
index aa91f76..115ae67 100644
--- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
+++ b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go
@@ -72,7 +72,10 @@ func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc {
}
// Modify the from kind to be correct with the new data
- f = reflect.ValueOf(data).Type()
+ f = nil
+ if val := reflect.ValueOf(data); val.IsValid() {
+ f = val.Type()
+ }
}
return data, nil