Merge pull request #2513 from jryans/null-dvb

Fix unmount TypeError in `DeviceVerifyButtons`
pull/21833/head
J. Ryan Stinnett 2019-01-25 22:57:45 -06:00 committed by GitHub
commit 4ac617c72b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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) {