From 784d6daeeef795d07129dcad9409d0ca2850cc58 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Thu, 31 Oct 2024 17:05:31 +0300 Subject: [PATCH] Lint fixes --- packages/forms/src/useform/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/forms/src/useform/index.js b/packages/forms/src/useform/index.js index 8e0c6cf90..19e59612a 100644 --- a/packages/forms/src/useform/index.js +++ b/packages/forms/src/useform/index.js @@ -35,8 +35,8 @@ export const useForm = (options = {}) => { let results = {}; isArray(options[option]) ? options[option].forEach(async (field) => (results = await validate(field))) : (options[option] ?? defaultValue) && (results = await validate()); - const field = Object.keys(fields).find((field) => fields[field]?.options?.[option]); + field && (results = await validate(field)); return results;