Skip to content

Commit

Permalink
remove extra shallow clone
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebill1049 committed Dec 7, 2020
1 parent 4daa7c6 commit ba23461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useFieldArray.ts
Expand Up @@ -295,7 +295,7 @@ export const useFieldArray = <
value: Partial<TFieldArrayValues> | Partial<TFieldArrayValues>[],
shouldFocus = true,
) => {
const appendValue = [...(Array.isArray(value) ? value : [value])];
const appendValue = Array.isArray(value) ? value : [value];
const updateFormValues = [
...getCurrentFieldsValues(),
...mapIds(appendValue, keyName),
Expand Down

0 comments on commit ba23461

Please sign in to comment.