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

Fix exception when opening dev tools #1961

Merged
merged 1 commit into from
Jun 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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