mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-14 15:09:59 -04:00
Merge pull request #672 from rschamp/bugfix/child-props
Don't error on null children
This commit is contained in:
commit
712aa8dbc2
1 changed files with 1 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue