mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -05:00
Use empty default object
Looks as if the having one of these objects as the default causes overwriting in some way, as opposed to augmentation. Have the source object be an empty one, so that it gets the attributes of both defaults and props. Fixes #642.
This commit is contained in:
parent
5b288e4d3e
commit
6db426a586
1 changed files with 3 additions and 2 deletions
|
@ -29,8 +29,9 @@ module.exports.validationHOCFactory = function (defaultValidationErrors) {
|
|||
var ValidatedComponent = React.createClass({
|
||||
render: function () {
|
||||
var validationErrors = defaults(
|
||||
this.props.validationErrors,
|
||||
defaultValidationErrors
|
||||
{},
|
||||
defaultValidationErrors,
|
||||
this.props.validationErrors
|
||||
);
|
||||
return (
|
||||
<Component {...this.props} validationErrors={validationErrors} />
|
||||
|
|
Loading…
Reference in a new issue