diff --git a/core/mapping/unmarshaler.go b/core/mapping/unmarshaler.go index b1ea2dbb..35a61de1 100644 --- a/core/mapping/unmarshaler.go +++ b/core/mapping/unmarshaler.go @@ -518,14 +518,14 @@ func (u *Unmarshaler) fillSliceValue(slice reflect.Value, index int, baseKind re target.Set(reflect.ValueOf(value)) ithVal.Set(target.Addr()) return nil - } else { - if ithVal.Kind() != reflect.TypeOf(value).Kind() { - return errTypeMismatch - } + } - ithVal.Set(reflect.ValueOf(value)) - return nil + if ithVal.Kind() != reflect.TypeOf(value).Kind() { + return errTypeMismatch } + + ithVal.Set(reflect.ValueOf(value)) + return nil } }