Commit 712aa8db authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

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

Don't error on null children
parents c50ac03a b7c46f48
......@@ -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 {
......
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