David Baker 2020-04-02 11:30:43 +01:00
parent 6db51cf9aa
commit 74186740ee
1 changed files with 3 additions and 6 deletions

View File

@ -107,14 +107,15 @@ export default class EditMessageComposer extends React.Component {
static contextType = MatrixClientContext;
constructor(props) {
super(props);
constructor(props, context) {
super(props, context);
this.model = null;
this._editorRef = null;
this.state = {
saveDisabled: true,
};
this._createEditorModel();
}
_setEditorRef = ref => {
@ -223,10 +224,6 @@ export default class EditMessageComposer extends React.Component {
this.props.editState.setEditorState(caret, parts);
}
componentDidMount() {
this._createEditorModel();
}
_createEditorModel() {
const {editState} = this.props;
const room = this._getRoom();