diff --git a/packages/preact/src/methods/setValues.ts b/packages/preact/src/methods/setValues.ts index ade7fd3..0863c78 100644 --- a/packages/preact/src/methods/setValues.ts +++ b/packages/preact/src/methods/setValues.ts @@ -125,7 +125,7 @@ export function setValues< const compoundPath = prevPath ? `${prevPath}.${path}` : path; // Set value of fields - if (!value || typeof value !== 'object' || Array.isArray(value)) { + if (!value || typeof value !== 'object' || !Array.isArray(value)) { setValue(form, compoundPath as FieldPath, value, { ...options, shouldValidate: false, diff --git a/packages/qwik/src/methods/setValues.ts b/packages/qwik/src/methods/setValues.ts index e036908..2f08a69 100644 --- a/packages/qwik/src/methods/setValues.ts +++ b/packages/qwik/src/methods/setValues.ts @@ -123,7 +123,7 @@ export function setValues< const compoundPath = prevPath ? `${prevPath}.${path}` : path; // Set value of fields - if (!value || typeof value !== 'object' || Array.isArray(value)) { + if (!value || typeof value !== 'object' || !Array.isArray(value)) { setValue(form, compoundPath as FieldPath, value, { ...options, shouldValidate: false, diff --git a/packages/react/src/methods/setValues.ts b/packages/react/src/methods/setValues.ts index 5ff4bcf..3646dad 100644 --- a/packages/react/src/methods/setValues.ts +++ b/packages/react/src/methods/setValues.ts @@ -125,7 +125,7 @@ export function setValues< const compoundPath = prevPath ? `${prevPath}.${path}` : path; // Set value of fields - if (!value || typeof value !== 'object' || Array.isArray(value)) { + if (!value || typeof value !== 'object' || !Array.isArray(value)) { setValue(form, compoundPath as FieldPath, value, { ...options, shouldValidate: false, diff --git a/packages/solid/src/methods/setValues.ts b/packages/solid/src/methods/setValues.ts index e620700..a97d3c2 100644 --- a/packages/solid/src/methods/setValues.ts +++ b/packages/solid/src/methods/setValues.ts @@ -125,7 +125,7 @@ export function setValues< const compoundPath = prevPath ? `${prevPath}.${path}` : path; // Set value of fields - if (!value || typeof value !== 'object' || Array.isArray(value)) { + if (!value || typeof value !== 'object' || !Array.isArray(value)) { setValue(form, compoundPath as FieldPath, value, { ...options, shouldValidate: false,