Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1961 from matrix-org/dbkr/fix_devtools_exception
Browse files Browse the repository at this point in the history
Fix exception when opening dev tools
  • Loading branch information
dbkr authored Jun 14, 2018
2 parents 038b43a + b81e12e commit bb99950
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/views/rooms/MessageComposerInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,14 @@ export default class MessageComposerInput extends React.Component {

let editorState = null;
if (contentState) {
editorState = EditorState.createWithContent(contentState, compositeDecorator);
editorState = EditorState.moveFocusToEnd(
EditorState.createWithContent(contentState, compositeDecorator)
);
} else {
editorState = EditorState.createEmpty(compositeDecorator);
}

return EditorState.moveFocusToEnd(editorState);
return editorState;
}

componentDidMount() {
Expand Down

0 comments on commit bb99950

Please sign in to comment.