title: draft-js Cannot read property 'getIn' of undefined ( getUpdatedSelectionState )
body: <p>I have this error with <strong>draft-js</strong> with <strong>draft-js-plugins-editor</strong></p>
  
  <p>STRANGE BEHAVIOR: it only happens, when I refocus to first line of editor after writing, when trying to set for eg. the header of first line to H1 it changes previous focused line</p>
  
  <p>ERROR: <code>Uncaught TypeError: Cannot read property 'getIn' of undefined</code></p>
  
  <p>FULL ERROR:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'getIn' of undefined
      at getUpdatedSelectionState (getUpdatedSelectionState.js?a009439:34)
      at getDraftEditorSelectionWithNodes (getDraftEditorSelectionWithNodes.js?a009439:37)
      at getDraftEditorSelection (getDraftEditorSelection.js?a7f8e9b:35)
      at editOnSelect (editOnSelect.js?a7f8e9b:32)
      at DraftEditor.react.js?f8ee1ff:148
      at HTMLUnknownElement.callCallback (react-dom.development.js?5f39724:542)
      at Object.invokeGuardedCallbackDev (react-dom.development.js?5f39724:581)
      at Object.invokeGuardedCallback (react-dom.development.js?5f39724:438)
      at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js?5f39724:452)
      at executeDispatch (react-dom.development.js?5f39724:836)
  </code></pre>
  
  <p>This is my component:</p>
  
  <pre><code>/* eslint-disable react/no-multi-comp */
  import React, {Component} from 'react';
  import sv from '../../config/styleVariables'
  
  import Editor from 'draft-js-plugins-editor';
  import {EditorState,convertToRaw} from 'draft-js'
  import createToolbarPlugin from 'draft-js-static-toolbar-plugin';
  import {
    ItalicButton,
    BoldButton,
    UnderlineButton,
    HeadlineOneButton,
    HeadlineTwoButton,
    HeadlineThreeButton,
    UnorderedListButton,
    OrderedListButton,
    BlockquoteButton,
  } from 'draft-js-buttons'
  
  
  
  
  export default class TextArea extends Component {
  
  
    constructor(props){
      super(props)
  
      this.state = {
        editorState: EditorState.createEmpty(),
      }
  
      const toolbarPlugin = createToolbarPlugin({
        structure: [
          BoldButton,
          ItalicButton,
          UnderlineButton,
          HeadlineOneButton, ,
          HeadlineTwoButton,
          HeadlineThreeButton,
          UnorderedListButton,
          OrderedListButton,
          // BlockquoteButton,
        ]
      })
  
      const { Toolbar } = toolbarPlugin;
      this.Toolbar = Toolbar
      this.plugins = [toolbarPlugin];
  
    }
  
    onChange(editorState){
      this.setState({
        editorState,
      })
      this.props.update(JSON.stringify(convertToRaw(editorState.getCurrentContent())))
    }
  
    focus(){
      this.editor.focus();
    }
  
    render() {
      const {Toolbar, plugins} = this
      const {name} = this.props
      return (
        &lt;div className="TextArea"&gt;
          {/*language=SCSS*/}
          &lt;style jsx global&gt;{`
            .TextArea .headlineButtonWrapper {
              display: inline-block;
            }
            .TextArea {
              background: ${sv.white};
            }
            .TextArea &gt; div&gt;div:first-child {
              display: flex;
              padding: 0 0 .25em 0;
              border-bottom: 1px solid ${sv.border};
            }
            .TextArea &gt; div&gt;div:first-child&gt;div button{
              background: transparent;
              cursor: pointer;
              border: none;
              display: flex;
              align-items: center;
              justify-content: center;
              width: 3em;
              height: 2.5em;
              font-size: .8em;
              margin-right: .2em;
            }
            .TextArea &gt; div&gt;div:first-child&gt;div button:hover {
              background: ${sv.extraLight};
              color: ${sv.primary};
            }
            .TextArea .DraftEditor-root {
              padding: 0 .5em;
              cursor: text;
            }
  
            .TextArea .headlineButton {
              background: #fbfbfb;
              color: #888;
              font-size: 18px;
              border: 0;
              padding-top: 5px;
              vertical-align: bottom;
              height: 34px;
              width: 36px;
            }
  
            .TextArea .headlineButton:hover,
            .TextArea .headlineButton:focus {
              background: #f3f3f3;
            }
          `}
          &lt;/style&gt;
          &lt;div onClick={this.focus.bind(this)}&gt;
            &lt;Toolbar key={name} /&gt;
            &lt;Editor
              editorState={this.state.editorState}
              onChange={this.onChange.bind(this)}
              plugins={plugins}
              ref={(element) =&gt; {
                this.editor = element
              }}
            /&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      );
    }
  }
  </code></pre>
  
  <p>My component looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/hYe5H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hYe5H.png" alt="my component"></a></p>