From 47958180a6cbf352fa5ac1a293374c5021b9ba39 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 14 Mar 2017 15:13:36 +0000 Subject: [PATCH] Add null check to start_login --- src/components/structures/MatrixChat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 7229c71437..4f3c8fe7e5 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -351,7 +351,9 @@ module.exports = React.createClass({ this.notifyNewScreen('register'); break; case 'start_login': - if (MatrixClientPeg.get().isGuest()) { + if (MatrixClientPeg.get() && + MatrixClientPeg.get().isGuest() + ) { this.setState({ guestCreds: MatrixClientPeg.getCredentials(), });