fix(field): return null when errors are empty (#8419)

Co-authored-by: shadcn <m@shadcn.com>
This commit is contained in:
Krishna Agarwal
2025-10-13 13:52:34 +05:30
committed by GitHub
parent b0b1cd1f0d
commit d198908510
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@@ -196,12 +196,12 @@ function FieldError({
return children
}
if (!errors) {
if (!errors?.length) {
return null
}
if (errors?.length === 1 && errors[0]?.message) {
return errors[0].message
if (errors?.length == 1) {
return errors[0]?.message
}
return (

File diff suppressed because one or more lines are too long