message: null-guard history properly
diff: @@ -1255,17 +1255,15 @@ export default class MessageComposerInput extends React.Component {
  let editorState;
  const historyItem = this.historyManager.getItem(delta);
  - if (historyItem) {
  + if (!historyItem) return;
  +
  if (historyItem.format === 'rich' && !this.state.isRichTextEnabled) {
  editorState = this.richToMdEditorState(historyItem.value);
  - }
  - else if (historyItem.format === 'markdown' && this.state.isRichTextEnabled) {
  + } else if (historyItem.format === 'markdown' && this.state.isRichTextEnabled) {
  editorState = this.mdToRichEditorState(historyItem.value);
  - }
  - else {
  + } else {
  editorState = historyItem.value;
  }
  - }
  // Move selection to the end of the selected history
  const change = editorState.change().collapseToEndOf(editorState.document);
  