1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

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() {
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
const cli = MatrixClientPeg.get();
if (cli) {
cli.removeListener("RoomState.events", this.onRoomStateEvents);
}
},
componentWillReceiveProps: function(newProps) {