Fix tests

This commit is contained in:
Luke Barnard 2018-03-14 14:55:36 +00:00
parent 8672b97f9a
commit c903cc6375

View file

@ -53,7 +53,10 @@ module.exports = React.createClass({
}, },
componentWillUnmount: function() { componentWillUnmount: function() {
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents); const cli = MatrixClientPeg.get();
if (cli) {
cli.removeListener("RoomState.events", this.onRoomStateEvents);
}
}, },
componentWillReceiveProps: function(newProps) { componentWillReceiveProps: function(newProps) {