Fix docs & add MatrixClient check
Addresses PR feedback without breaking RoomSettings
This commit is contained in:
@@ -38,7 +38,7 @@ function parseIntWithDefault(val, def) {
|
|||||||
|
|
||||||
const BannedUser = React.createClass({
|
const BannedUser = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
member: React.PropTypes.string.isRequired,
|
member: React.PropTypes.object.isRequired, // js-sdk RoomMember
|
||||||
},
|
},
|
||||||
|
|
||||||
_onUnbanClick: function() {
|
_onUnbanClick: function() {
|
||||||
@@ -147,7 +147,10 @@ module.exports = React.createClass({
|
|||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
ScalarMessaging.stopListening();
|
ScalarMessaging.stopListening();
|
||||||
|
|
||||||
MatrixClientPeg.get().removeListener("RoomMember.membership", this._onRoomMemberMembership);
|
const cli = MatrixClientPeg.get();
|
||||||
|
if (cli) {
|
||||||
|
cli.removeListener("RoomMember.membership", this._onRoomMemberMembership);
|
||||||
|
}
|
||||||
|
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'ui_opacity',
|
action: 'ui_opacity',
|
||||||
|
|||||||
Reference in New Issue
Block a user