fixed issue vector-im/vector-web 1079

This commit is contained in:
Minhaz A V 2016-03-05 23:36:24 +05:30
parent b66ca74ede
commit 3c1312a9e6

View File

@ -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});