Commit 262569c7 authored by Matthew Taylor's avatar Matthew Taylor Committed by GitHub

Merge pull request #653 from mewtaylor/issue/gh-642-validation-msg

Fix GH-642: Use empty default object for validation factory
parents 5b288e4d 6db426a5
...@@ -29,8 +29,9 @@ module.exports.validationHOCFactory = function (defaultValidationErrors) { ...@@ -29,8 +29,9 @@ module.exports.validationHOCFactory = function (defaultValidationErrors) {
var ValidatedComponent = React.createClass({ var ValidatedComponent = React.createClass({
render: function () { render: function () {
var validationErrors = defaults( var validationErrors = defaults(
this.props.validationErrors, {},
defaultValidationErrors defaultValidationErrors,
this.props.validationErrors
); );
return ( return (
<Component {...this.props} validationErrors={validationErrors} /> <Component {...this.props} validationErrors={validationErrors} />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment