summaryrefslogtreecommitdiffstats
path: root/webapp/root.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-04-04 11:09:59 -0400
committerChristopher Speller <crspeller@gmail.com>2016-04-04 11:09:59 -0400
commit5f3111e8809ccc4fe32cc2958da5a47fd9c09bef (patch)
tree5f84d08557797f6363fc30647967ac227eaa12b6 /webapp/root.jsx
parent785553384fe96027b0e9274b6ccc8623092eda70 (diff)
downloadchat-5f3111e8809ccc4fe32cc2958da5a47fd9c09bef.tar.gz
chat-5f3111e8809ccc4fe32cc2958da5a47fd9c09bef.tar.bz2
chat-5f3111e8809ccc4fe32cc2958da5a47fd9c09bef.zip
Fxing some channel changing issues
Diffstat (limited to 'webapp/root.jsx')
-rw-r--r--webapp/root.jsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/webapp/root.jsx b/webapp/root.jsx
index da5980c33..10cc63643 100644
--- a/webapp/root.jsx
+++ b/webapp/root.jsx
@@ -197,6 +197,12 @@ function doChannelChange(state) {
channel = JSON.parse(state.location.query.fakechannel);
} else {
channel = ChannelStore.getByName(state.params.channel);
+ if (!channel) {
+ channel = ChannelStore.getMoreByName(state.params.channel);
+ }
+ if (!channel) {
+ console.error('Unable to get channel to change to.'); //eslint-disable-line no-console
+ }
}
GlobalActions.emitChannelClickEvent(channel);
}