diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 284edf62a1..c925e3f93d 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -589,7 +589,16 @@ module.exports = React.createClass({ var theAlias = MatrixTools.getCanonicalAliasForRoom(room); if (theAlias) presentedId = theAlias; } - self.notifyNewScreen('room/'+presentedId); + + if (typeof presentedId != 'undefined') { + self.notifyNewScreen('room/'+presentedId); + } else { + // There is no information on presentedId + // so point user to fallback like /directory + // TODO(mebjas): confirm if this is correct fallback + self.notifyNewScreen('directory'); + } + dis.dispatch({action: 'focus_composer'}); } else { self.setState({ready: true});