Fix unmount TypeError in `DeviceVerifyButtons`

pull/21833/head
J. Ryan Stinnett 2019-01-25 17:54:11 -06:00
parent a07ba49641
commit d1b78e5b08
1 changed files with 3 additions and 1 deletions

View File

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