Skip to content

Commit

Permalink
Added catch-all to validation promises (closes #471).
Browse files Browse the repository at this point in the history
  • Loading branch information
idmadj authored and radekmie committed Sep 26, 2018
1 parent d2b87d3 commit 4b85642
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/uniforms/src/ValidatedForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ const Validated = parent => class extends parent {
validator: bridge.getValidator(validator)
}), () => {
if (validate === 'onChange' || validate === 'onChangeAfterSubmit' && this.state.validate) {
this.onValidate();
this.onValidate().catch(() => {});
}
});
} else if (!isEqual(this.props.model, model)) {
if (validate === 'onChange' || validate === 'onChangeAfterSubmit' && this.state.validate) {
this.onValidateModel(model);
this.onValidateModel(model).catch(() => {});
}
}
}
Expand Down

0 comments on commit 4b85642

Please sign in to comment.