Fix TypeError in Composer.focus

Uncaught (in promise) TypeError: this.textInput.current is null
This commit is contained in:
Simon Ser 2020-07-13 09:45:30 +02:00
parent c9b07efc9c
commit 2941dc0076
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

View File

@ -71,6 +71,9 @@ export default class Composer extends Component {
}
focus() {
if (!this.textInput.current) {
return;
}
document.activeElement.blur(); // in case we're read-only
this.textInput.current.focus();
}