From 3c1312a9e6003c6633b3ff7b1850f8aed84af693 Mon Sep 17 00:00:00 2001 From: Minhaz A V Date: Sat, 5 Mar 2016 23:36:24 +0530 Subject: [PATCH] fixed issue vector-im/vector-web 1079 --- src/components/structures/MatrixChat.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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});