Skip to content

Commit

Permalink
fix: minifier issue when handling await
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed May 14, 2021
1 parent c615c33 commit f206cac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vee-validate/src/useForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ export function useForm<TValues extends Record<string, any> = Record<string, any
return { valid: true, results: {} };
}

const formResult = await (isYupValidator(schemaValue)
? validateYupSchema(schemaValue, formValues)
: validateObjectSchema(schemaValue as RawFormSchema<TValues>, formValues, { names: fieldNames.value }));
const formResult = isYupValidator(schemaValue)
? await validateYupSchema(schemaValue, formValues)
: await validateObjectSchema(schemaValue as RawFormSchema<TValues>, formValues, { names: fieldNames.value });

const fieldsById = formCtx.fieldsById.value || {};
// collect all the keys from the schema and all fields
Expand Down

0 comments on commit f206cac

Please sign in to comment.