Merge pull request #672 from rschamp/bugfix/child-props

Don't error on null children
This commit is contained in:
Ray Schamp 2016-07-05 15:48:56 -04:00 committed by GitHub
commit 712aa8dbc2

View file

@ -32,6 +32,7 @@ var Form = React.createClass({
return (
<Formsy.Form {... this.props} className={classes} ref="formsy" onChange={this.onChange}>
{React.Children.map(this.props.children, function (child) {
if (!child) return child;
if (child.props.name === 'all') {
return React.cloneElement(child, {value: this.state.allValues});
} else {