Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebarnard1 committed Mar 14, 2018
1 parent 8672b97 commit c903cc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/views/avatars/RoomAvatar.js
Expand Up @@ -53,7 +53,10 @@ module.exports = React.createClass({
},

componentWillUnmount: function() {
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
const cli = MatrixClientPeg.get();
if (cli) {
cli.removeListener("RoomState.events", this.onRoomStateEvents);
}
},

componentWillReceiveProps: function(newProps) {
Expand Down

0 comments on commit c903cc6

Please sign in to comment.