Skip to content

Commit

Permalink
Use a cached object for syncErrors and syncWarnings (#4010)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorPeterVanNostrand authored and erikras committed May 1, 2018
1 parent 572041a commit 23b1fbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/createReduxForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,8 +998,8 @@ const createReduxForm = (structure: Structure<*, *>) => {

const pristine = shouldResetValues || deepEqual(initial, values)
const asyncErrors = getIn(formState, 'asyncErrors')
const syncErrors = getIn(formState, 'syncErrors') || {}
const syncWarnings = getIn(formState, 'syncWarnings') || {}
const syncErrors = getIn(formState, 'syncErrors') || plain.empty
const syncWarnings = getIn(formState, 'syncWarnings') || plain.empty
const registeredFields = getIn(formState, 'registeredFields')
const valid = isValid(form, getFormState, false)(state)
const validExceptSubmit = isValid(form, getFormState, true)(state)
Expand Down

0 comments on commit 23b1fbd

Please sign in to comment.