Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c903cc6

Browse files
committed
Fix tests
1 parent 8672b97 commit c903cc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/views/avatars/RoomAvatar.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ module.exports = React.createClass({
5353
},
5454

5555
componentWillUnmount: function() {
56-
MatrixClientPeg.get().removeListener("RoomState.events", this.onRoomStateEvents);
56+
const cli = MatrixClientPeg.get();
57+
if (cli) {
58+
cli.removeListener("RoomState.events", this.onRoomStateEvents);
59+
}
5760
},
5861

5962
componentWillReceiveProps: function(newProps) {

0 commit comments

Comments
 (0)