title: React.cloneElement() giving cannot read props of undefined error unexpectedly
body: <p>I am passing some JSX through a React component prop. I am then trying to clone that JSX in order to add a listener, using React.cloneElement(). Doing so however give me the error </p>
  
  <blockquote>
    <p>Uncaught TypeError: Cannot read property 'props' of undefined</p>
  </blockquote>
  
  <p>Here is the component that is passing the JSX into a child React element:</p>
  
  <pre><code>&lt;FormModal
      size='small'
      formName='sortForm'
      header='Sort'
      headerIcon='sort'
      handleSubmit={ this.sortSubmit }
      content={
          &lt;SortForm table={ this.props.table } initialValues={ { orderBy: this.props.search.orderBy, orderDirection: this.props.search.orderDirection } } /&gt;
      }
      trigger={
          &lt;Button icon floated='right' size="mini"&gt;
              &lt;Icon name='sort' /&gt;
          &lt;/Button&gt;
      }
  /&gt;
  </code></pre>
  
  <p>Here is the <code>FormModal</code> code that clones the passed in <code>content</code> and <code>trigger</code> props:</p>
  
  <pre><code>class FormModal extends Component {
  
      constructor( props ) {
          super( props );
          this.handleOkay = this.handleOkay.bind( this );
          this.handleSubmit = this.handleSubmit.bind( this );
          this.handleOpen = this.handleOpen.bind( this );
          this.handleClose = this.handleClose.bind( this );
          this.modalOpen = false;
          // here:
          this.content = React.cloneElement(
              this.props.content, 
              { onSubmit: this.handleSubmit }
          );
          this.trigger = React.cloneElement(
              this.props.trigger, 
              { onClick: this.handleOpen }
          );
      }
  </code></pre>
  
  <p>If I replace <code>this.props.content</code> and <code>this.props.trigger</code> in the <code>cloneElement()</code> arguments with some simple JSX like <code>&lt;div&gt;&lt;/div&gt;</code>, it works without error, so I know the issue is with those props being passed in. I cannot figure out why however. console logging those props just beforehand shows they are not undefined.</p>