mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
MemberInfo: initialise _enableDevices in componentWillMount
... to avoid referencing it in render() before it is set
This commit is contained in:
parent
30168a1b9c
commit
0356f04b9c
1 changed files with 5 additions and 5 deletions
|
@ -67,17 +67,17 @@ module.exports = React.createClass({
|
|||
componentWillMount: function() {
|
||||
this._cancelDeviceList = null;
|
||||
|
||||
// only display the devices list if our client supports E2E *and* the
|
||||
// feature is enabled in the user settings
|
||||
this._enableDevices = MatrixClientPeg.get().isCryptoEnabled() &&
|
||||
UserSettingsStore.isFeatureEnabled("e2e_encryption");
|
||||
|
||||
this.setState({
|
||||
existingOneToOneRoomId: this.getExistingOneToOneRoomId()
|
||||
});
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
// only display the devices list if our client supports E2E *and* the
|
||||
// feature is enabled in the user settings
|
||||
this._enableDevices = MatrixClientPeg.get().isCryptoEnabled() &&
|
||||
UserSettingsStore.isFeatureEnabled("e2e_encryption");
|
||||
|
||||
this._updateStateForNewMember(this.props.member);
|
||||
MatrixClientPeg.get().on("deviceVerificationChanged", this.onDeviceVerificationChanged);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue