diff --git a/src/components/views/rooms/MessageComposer.js b/src/components/views/rooms/MessageComposer.js index d70cb5c786..819f9749e7 100644 --- a/src/components/views/rooms/MessageComposer.js +++ b/src/components/views/rooms/MessageComposer.js @@ -415,10 +415,9 @@ export default class MessageComposer extends React.Component { this.messageComposerInput._sendMessage(); } - onChange = () => { - if (!this.messageComposerInput) return; + onChange = (model) => { this.setState({ - isComposerEmpty: this.messageComposerInput.model.isEmpty, + isComposerEmpty: model.isEmpty, }); } diff --git a/src/components/views/rooms/SendMessageComposer.js b/src/components/views/rooms/SendMessageComposer.js index 657d67aee2..068627455d 100644 --- a/src/components/views/rooms/SendMessageComposer.js +++ b/src/components/views/rooms/SendMessageComposer.js @@ -538,7 +538,7 @@ export default class SendMessageComposer extends React.Component { } onChange = () => { - if (this.props.onChange) this.props.onChange(); + if (this.props.onChange) this.props.onChange(this.model); } render() {