Macaron: Continue on invalid slice type to avoid panic (#39004)
Makes the panic go away. Otherwise I get a reflect: call of reflect.Value.Interface on zero Value
This commit is contained in:
@@ -419,6 +419,10 @@ func validateField(errors Errors, zero interface{}, field reflect.StructField, f
|
||||
sliceVal = sliceVal.Elem()
|
||||
}
|
||||
|
||||
if sliceVal.Kind() == reflect.Invalid {
|
||||
continue
|
||||
}
|
||||
|
||||
sliceValue := sliceVal.Interface()
|
||||
zero := reflect.Zero(sliceVal.Type()).Interface()
|
||||
if sliceVal.Kind() == reflect.Struct ||
|
||||
|
||||
Reference in New Issue
Block a user