1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Check if the method is defined before calling it

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-02-12 16:48:46 +01:00
parent 2b4859a858
commit 97f5b6920c

View File

@@ -538,8 +538,10 @@ export default class SendMessageComposer extends React.Component {
} }
onChange = () => { onChange = () => {
if (this.props.onIsEmptyChanged) {
this.props.onIsEmptyChanged(this.model.isEmpty); this.props.onIsEmptyChanged(this.model.isEmpty);
} }
}
render() { render() {
return ( return (