mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Fix docs & add MatrixClient check
Addresses PR feedback without breaking RoomSettings
This commit is contained in:
parent
a5a056292d
commit
8698d40d3c
1 changed files with 5 additions and 2 deletions
|
@ -38,7 +38,7 @@ function parseIntWithDefault(val, def) {
|
|||
|
||||
const BannedUser = React.createClass({
|
||||
propTypes: {
|
||||
member: React.PropTypes.string.isRequired,
|
||||
member: React.PropTypes.object.isRequired, // js-sdk RoomMember
|
||||
},
|
||||
|
||||
_onUnbanClick: function() {
|
||||
|
@ -147,7 +147,10 @@ module.exports = React.createClass({
|
|||
componentWillUnmount: function() {
|
||||
ScalarMessaging.stopListening();
|
||||
|
||||
MatrixClientPeg.get().removeListener("RoomMember.membership", this._onRoomMemberMembership);
|
||||
const cli = MatrixClientPeg.get();
|
||||
if (cli) {
|
||||
cli.removeListener("RoomMember.membership", this._onRoomMemberMembership);
|
||||
}
|
||||
|
||||
dis.dispatch({
|
||||
action: 'ui_opacity',
|
||||
|
|
Loading…
Reference in a new issue