Browse Source

fix: 空数组覆盖有效数组 (#2687)

pull/2688/head
oooplz 3 years ago
committed by GitHub
parent
commit
401fcaf325
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/Form/src/hooks/useFormEvents.ts

2
src/components/Form/src/hooks/useFormEvents.ts

@ -43,7 +43,7 @@ function tryConstructArray(field: string, values: Recordable = {}): any[] | unde
set(result, index, values[k.trim()]);
});
return result.length ? result : undefined;
return result.filter(Boolean).length ? result : undefined;
}
}
}

Loading…
Cancel
Save