Commit 401fcaf325c077099ea44c2be3aed8f5c6ec4876
Committed by
GitHub
1 parent
5e8ef2f6
fix: 空数组覆盖有效数组 (#2687)
Showing
1 changed file
with
1 additions
and
1 deletions
src/components/Form/src/hooks/useFormEvents.ts
... | ... | @@ -43,7 +43,7 @@ function tryConstructArray(field: string, values: Recordable = {}): any[] | unde |
43 | 43 | set(result, index, values[k.trim()]); |
44 | 44 | }); |
45 | 45 | |
46 | - return result.length ? result : undefined; | |
46 | + return result.filter(Boolean).length ? result : undefined; | |
47 | 47 | } |
48 | 48 | } |
49 | 49 | } | ... | ... |