Add null check to start_login

pull/21833/head
Luke Barnard 2017-03-14 15:13:36 +00:00
parent 5e93dde0dd
commit 47958180a6
1 changed files with 3 additions and 1 deletions

View File

@ -351,7 +351,9 @@ module.exports = React.createClass({
this.notifyNewScreen('register'); this.notifyNewScreen('register');
break; break;
case 'start_login': case 'start_login':
if (MatrixClientPeg.get().isGuest()) { if (MatrixClientPeg.get() &&
MatrixClientPeg.get().isGuest()
) {
this.setState({ this.setState({
guestCreds: MatrixClientPeg.getCredentials(), guestCreds: MatrixClientPeg.getCredentials(),
}); });