react-hook-form 7.34.1 → 7.34.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1976,6 +1976,9 @@ function createFormControl(props = {}) {
1976
1976
  }
1977
1977
  let hasNoPromiseError = true;
1978
1978
  let fieldValues = cloneObject(_formValues);
1979
+ _subjects.state.next({
1980
+ isSubmitting: true,
1981
+ });
1979
1982
  try {
1980
1983
  if (_options.resolver) {
1981
1984
  const { errors, values } = await _executeSchema();
@@ -1999,9 +2002,6 @@ function createFormControl(props = {}) {
1999
2002
  _options.shouldFocusError &&
2000
2003
  focusFieldBy(_fields, (key) => get(_formState.errors, key), _names.mount);
2001
2004
  }
2002
- _subjects.state.next({
2003
- isSubmitting: true,
2004
- });
2005
2005
  }
2006
2006
  catch (err) {
2007
2007
  hasNoPromiseError = false;