Correctly bail out on unknown address

pull/21833/head
David Baker 2017-01-25 14:50:00 +00:00
parent 6c263c1c89
commit 9020a7515c
1 changed files with 2 additions and 0 deletions

View File

@ -405,6 +405,8 @@ module.exports = React.createClass({
isKnown: false, isKnown: false,
}; };
if (addrType == null) { if (addrType == null) {
this.setState({ error: true });
return null;
} else if (addrType == 'mx') { } else if (addrType == 'mx') {
const user = MatrixClientPeg.get().getUser(addrObj.address); const user = MatrixClientPeg.get().getUser(addrObj.address);
if (user) { if (user) {