Merge pull request #2513 from jryans/null-dvb

Fix unmount TypeError in `DeviceVerifyButtons`
This commit is contained in:
J. Ryan Stinnett
2019-01-25 22:57:45 -06:00
committed by GitHub

View File

@@ -42,7 +42,9 @@ export default React.createClass({
componentWillUnmount: function() {
const cli = MatrixClientPeg.get();
cli.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged);
if (cli) {
cli.removeListener("deviceVerificationChanged", this.onDeviceVerificationChanged);
}
},
onDeviceVerificationChanged: function(userId, deviceId, deviceInfo) {